123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502 |
- <UserControl
- x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.LinkAnnotProperty"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:AnnotPanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
- xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:CustomControl="clr-namespace:PDF_Office.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:data="clr-namespace:ComPDFKit.PDFDocument;assembly=ComPDFKit.Desk"
- xmlns:helper="clr-namespace:PDF_Office.Helper"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Office.Views.BOTA"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:property="clr-namespace:PDF_Office.Properties"
- Name="LinkAnnotPropertyContent"
- d:DataContext="{d:DesignInstance Type=AnnotPanel:LinkAnnotPropertyViewModel}"
- d:DesignHeight="680"
- d:DesignWidth="260"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/Styles/RadioButtonStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Convert:ObjectConvert x:Key="ObjectConvert" />
- <Convert:StringToVisibleConvert x:Key="StringToVisibleConvert" />
- <Convert:StringToUnVisibleConvert x:Key="StringToUnVisibleConvert" />
- <Convert:BoolToVisible x:Key="BoolToVisible" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <StackPanel Background="White" Orientation="Vertical">
- <TextBlock
- Name="AnnotTypeTitle"
- Margin="0,12,0,12"
- HorizontalAlignment="Left"
- FontFamily="Segoe UI"
- FontSize="18"
- FontWeight="Bold"
- LineHeight="24">
- Link
- </TextBlock>
- <StackPanel
- Name="ToggleButtonTab"
- Margin="12,0,0,0"
- Orientation="Horizontal">
- <RadioButton
- Name="LinkPageBtn"
- Width="75"
- Height="28"
- VerticalContentAlignment="Center"
- Command="{Binding ToggleButtonTabCommand}"
- GroupName="LinkTab"
- IsChecked="True"
- Style="{StaticResource PageViewRadioBtn}"
- Tag="Page">
- <!--<ToggleButton.CommandParameter>
- <MultiBinding Converter="{StaticResource ResourceKey=ObjectConvert}" Mode="TwoWay">
- <MultiBinding.Bindings>
- <Binding ElementName="LinkPageBtn" />
- -->
- <!--<Binding ElementName="LinkWebBtn" />
- <Binding ElementName="LinkMailBtn" />-->
- <!--
- </MultiBinding.Bindings>
- </MultiBinding>
- </ToggleButton.CommandParameter>-->
- <StackPanel>
- <Path
- Margin="8,8,8,8"
- HorizontalAlignment="Center"
- Fill="#252629">
- <Path.Data>
- M12.8335 14.5V5.33432L9.70479 1.5H3.8335V14.5H12.8335ZM3.3335
- 0C2.78121 0 2.3335 0.447715 2.3335 1V15C2.3335 15.5523 2.78121 16 3.3335
- 16H13.3335C13.8858 16 14.3335 15.5523 14.3335 15V5.15622C14.3335 4.92583
- 14.2539 4.70251 14.1083 4.524L10.7169 0.367788C10.527 0.135042 10.2425
- 0 9.94214 0H3.3335ZM9.8335 7.25H4.8335V5.75H9.8335V7.25ZM4.8335
- 10.25H11.8335V8.75H4.8335V10.25Z
- </Path.Data>
- </Path>
- <TextBlock
- x:Name="LinkPageText"
- Width="36"
- FontFamily="Segoe UI"
- FontSize="12"
- LineHeight="16"
- TextAlignment="Center"
- TextWrapping="Wrap" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="LinkWebBtn"
- Width="75"
- Height="28"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Command="{Binding ToggleButtonTabCommand}"
- GroupName="LinkTab"
- IsChecked="False"
- Style="{StaticResource PageViewRadioBtn}"
- Tag="Web">
- <StackPanel>
- <Path
- Margin="8,8,8,8"
- HorizontalAlignment="Center"
- Fill="#252629">
- <Path.Data>
- M8.66618 14.4663C8.44716 14.4886 8.22491 14.5 8 14.5C7.85803
- 14.5 7.71712 14.4954 7.57741 14.4865C7.10001 13.5646 6.74754
- 12.6476 6.49725 11.75H9.73591C9.48745 12.6411 9.13829 13.5512 8.66618
- 14.4663ZM10.5459 13.9825C11.6619 13.507 12.6176 12.7283 13.3098
- 11.75H11.2887C11.1051 12.4836 10.8609 13.2299 10.5459 13.9825ZM11.5858
- 10.25H14.1C14.3587 9.5489 14.5 8.79095 14.5 8C14.5 7.20905 14.3587 6.4511
- 14.1 5.75H11.5922C11.7855 7.11458 11.8224 8.63886 11.5858 10.25ZM10.0763
- 5.75H6.15683C5.94754 7.09263 5.90154 8.62363 6.16683 10.25H10.0663C10.3316
- 8.62363 10.2856 7.09263 10.0763 5.75ZM9.76021 4.25H6.47294C6.78297 3.09108
- 7.1942 2.14973 7.56609 1.51425C7.7095 1.5048 7.85419 1.5 8 1.5C8.22937 1.5
- 8.45596 1.51188 8.67919 1.53506C9.04787 2.17019 9.45355 3.10366 9.76021
- 4.25ZM11.3063 4.25H13.3098C12.6268 3.28462 11.6871 2.5137 10.5902
- 2.03658C10.8556 2.67393 11.1063 3.4192 11.3063 4.25ZM4.94441
- 11.75C5.13712 12.5199 5.39657 13.3038 5.73452 14.0943C4.49822 13.6345
- 3.43967 12.8093 2.69016 11.75H4.94441ZM4.64733 10.25C4.41071 8.63886
- 4.44762 7.11458 4.64092 5.75H1.89996C1.64127 6.4511 1.5 7.20905 1.5 8C1.5 8.79095 1.64127 9.5489
- 1.89996 10.25H4.64733ZM4.92683 4.25C5.13895 3.36886 5.40812 2.58393 5.69137 1.92192C4.47359 2.38472
- 3.43094 3.203 2.69016 4.25H4.92683ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0
- 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8Z
- </Path.Data>
- </Path>
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="LinkMailBtn"
- Width="75"
- Height="28"
- VerticalContentAlignment="Center"
- Background="Transparent"
- Command="{Binding ToggleButtonTabCommand}"
- GroupName="LinkTab"
- IsChecked="False"
- Style="{StaticResource PageViewRadioBtn}"
- Tag="Mail">
- <StackPanel>
- <Path
- Margin="8,8,8,8"
- HorizontalAlignment="Center"
- Fill="#252629">
- <Path.Data>
- M1.5 2.27882V10.5H14.5V2.27882L8.43593 6.6103C8.17516 6.79657
- 7.82484 6.79657 7.56407 6.6103L1.5 2.27882ZM13.0097
- 1.5H2.99035L8 5.07832L13.0097 1.5ZM0 1C0 0.447715
- 0.447715 0 1 0H15C15.5523 0 16 0.447715 16 1V11C16 11.5523 15.5523 12 15 12H1C0.447715 12 0 11.5523 0 11V1Z
- </Path.Data>
- </Path>
- </StackPanel>
- </RadioButton>
- </StackPanel>
- <Line
- Width="232"
- Margin="0,4,0,0"
- HorizontalAlignment="Center"
- Stroke="#1A000000"
- StrokeThickness="1"
- X1="0"
- X2="232"
- Y1="0"
- Y2="0" />
- <Grid MinWidth="260">
- <StackPanel Name="LinkPagePanel" Visibility="{Binding ElementName=LinkPageBtn, Path=IsChecked, Converter={StaticResource BoolToVisible}, Mode=OneWay}">
- <TextBlock
- x:Name="TxtPage"
- Height="20"
- Margin="16,12,0,4"
- FontFamily="Segoe UI"
- FontSize="12"
- Foreground="#616469"
- LineHeight="20"
- Text="Page" />
- <StackPanel Orientation="Horizontal">
- <Grid>
- <!--<CustomControl:TextBoxEx
- x:Name="PageNumText"
- Width="228"
- Height="32"
- Margin="16,0"
- VerticalContentAlignment="Center"
- IsEnabled="False"
- PlaceholderText="Enter target page">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding PageNumTextChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CustomControl:TextBoxEx>-->
- <CustomControl:TextBoxWithTip
- x:Name="PageNumText"
- Width="228"
- Margin="16,0"
- VerticalContentAlignment="Center"
- IsEnabled="False"
- ShowTip="Collapsed"
- Text="Enter target page"
- TipText=" Page number error.">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding PageNumTextChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CustomControl:TextBoxWithTip>
- <!--<Border
- Name="BorderPageNumText"
- Width="228"
- Height="32"
- Margin="16,0"
- Background="LightGray"
- BorderBrush="#1770F4"
- BorderThickness="1"
- CornerRadius="4">
- <TextBox
- Name="PageNumText"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- IsEnabled="False">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding PageNumTextChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </TextBox>
- </Border>
- <TextBlock
- x:Name="defaultPageNumText"
- Margin="25,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Foreground="Gray"
- IsHitTestVisible="False"
- Visibility="{Binding ElementName=PageNumText, Path=Text, Converter={StaticResource StringToUnVisibleConvert}, Mode=OneWay}">
- Enter target page
- </TextBlock>
- <Button
- Width="18"
- Height="18"
- Margin="0,0,18,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Background="Transparent"
- Tag="PageNumText"
- Visibility="{Binding ElementName=PageNumText, Path=Text, Converter={StaticResource StringToVisibleConvert}}">
- <Button.Content>
- <Path Fill="#333333">
- <Path.Data>
- M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,
- 14.9852814 L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
- </Path.Data>
- <Path.RenderTransform>
- <TransformGroup>
- <TranslateTransform X="-8" />
- <RotateTransform Angle="45" />
- <TranslateTransform X="13" />
- </TransformGroup>
- </Path.RenderTransform>
- </Path>
- </Button.Content>
- </Button>-->
- </Grid>
- <!--<TextBlock
- Name="PageNumBlock"
- Height="20"
- Margin="8,0,0,0"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- LineHeight="20"
- TextAlignment="Center" />-->
- </StackPanel>
- <!--<TextBlock
- Name="ErrorNumTips"
- Margin="12,0,0,0"
- Foreground="Red"
- Visibility="{Binding ErrorNumTipsVisibility}">
- Page number error.
- </TextBlock>
- <TextBlock
- Name="ErrorRangeTips"
- Margin="12,0,0,0"
- Foreground="Red"
- Visibility="{Binding ErrorRangeTipsVisibility}">
- Page number out of range.
- </TextBlock>-->
- <Button
- Name="BtnLocation"
- Width="228"
- Height="32"
- Margin="16,16,16,0"
- IsEnabled="False"
- Style="{StaticResource Btn.cta}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Path
- Name="PathLocation"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Data="M15.064 6.88052L13.5661 6.49468L9.57748 11.6857L10.2156 13.8898C10.3593 14.3863 9.74722 14.7479 9.38174 14.3824L6.59721 11.5979L0.0145727 15.9711L4.38786 9.38851L1.60356 6.60421C1.23807 6.23873 1.59967 5.62665 2.09615 5.77038L4.30107 6.40871L9.49166 2.42039L9.10576 0.92227C8.97879 0.42937 9.58359 0.0840825 9.9435 0.443993L15.5423 6.04277C15.9022 6.40268 15.5569 7.00748 15.064 6.88052Z"
- Fill="White" />
- <TextBlock Margin="10,0" Text="Locate the target page" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Image
- Name="ImagePreview"
- Width="196"
- Height="254"
- Margin="32"
- Source="{Binding PreviewImage}"
- Visibility="{Binding ImagePreviewVisibility}" />
- </StackPanel>
- <StackPanel Name="LinkWebPanel" Visibility="{Binding ElementName=LinkWebBtn, Path=IsChecked, Converter={StaticResource BoolToVisible}, Mode=OneWay}">
- <TextBlock
- Height="20"
- Margin="16,12,0,4"
- FontFamily="Segoe UI"
- FontSize="12"
- Foreground="#616469"
- LineHeight="20"
- Text="URL" />
- <Grid>
- <Border
- Name="BorderPageWebText"
- Width="228"
- Height="32"
- Margin="16,0"
- Background="#FFFFFF"
- BorderBrush="#1770F4"
- BorderThickness="1"
- CornerRadius="4">
- <TextBox
- Name="PageWebText"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- IsEnabled="True" />
- </Border>
- <TextBlock
- x:Name="defaultPageWebText"
- Margin="25,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Foreground="Gray"
- IsHitTestVisible="False"
- Visibility="{Binding ElementName=PageWebText, Path=Text, Converter={StaticResource StringToUnVisibleConvert}, Mode=OneWay}">
- https://www.pdfreaderpro.com
- </TextBlock>
- <Button
- Width="18"
- Height="18"
- Margin="0,0,18,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Background="Transparent"
- Tag="PageWebText"
- Visibility="{Binding ElementName=PageWebText, Path=Text, Converter={StaticResource StringToVisibleConvert}}">
- <Button.Content>
- <Path Fill="#333333">
- <Path.Data>
- M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,
- 14.9852814 L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
- </Path.Data>
- <Path.RenderTransform>
- <TransformGroup>
- <TranslateTransform X="-8" />
- <RotateTransform Angle="45" />
- <TranslateTransform X="13" />
- </TransformGroup>
- </Path.RenderTransform>
- </Path>
- </Button.Content>
- </Button>
- </Grid>
- <TextBlock
- Name="ErrorUrlTips"
- Margin="12,0,0,0"
- Foreground="Red"
- Visibility="Collapsed">
- Invalid link.
- </TextBlock>
- </StackPanel>
- <StackPanel Name="LinkMailPanel" Visibility="{Binding ElementName=LinkMailBtn, Path=IsChecked, Converter={StaticResource BoolToVisible}, Mode=OneWay}">
- <TextBlock
- Height="20"
- Margin="12,12,0,4"
- FontFamily="Segoe UI"
- FontSize="14"
- LineHeight="20">
- Email
- </TextBlock>
- <Grid>
- <Border
- Name="BorderPageMailText"
- Width="228"
- Height="32"
- Margin="16,0"
- Background="#FFFFFF"
- BorderBrush="#1770F4"
- BorderThickness="1"
- CornerRadius="4">
- <TextBox
- Name="PageMailText"
- Width="232"
- Height="32"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderBrush="Transparent"
- IsEnabled="False" />
- </Border>
- <TextBlock
- x:Name="defaultPageMailText"
- Margin="25,0,0,0"
- VerticalAlignment="Center"
- FontSize="14"
- Foreground="Gray"
- IsHitTestVisible="False"
- Visibility="{Binding ElementName=PageMailText, Path=Text, Converter={StaticResource StringToUnVisibleConvert}, Mode=OneWay}">
- support@pdfreaderpro.com
- </TextBlock>
- <Button
- Width="18"
- Height="18"
- Margin="0,0,18,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Background="Transparent"
- Tag="PageMailText"
- Visibility="{Binding ElementName=PageMailText, Path=Text, Converter={StaticResource StringToVisibleConvert}}">
- <Button.Content>
- <Path Fill="#333333">
- <Path.Data>
- M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,
- 14.9852814 L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
- </Path.Data>
- <Path.RenderTransform>
- <TransformGroup>
- <TranslateTransform X="-8" />
- <RotateTransform Angle="45" />
- <TranslateTransform X="13" />
- </TransformGroup>
- </Path.RenderTransform>
- </Path>
- </Button.Content>
- </Button>
- </Grid>
- <TextBlock
- Name="ErrorMailTips"
- Margin="12,0,0,0"
- Foreground="Red"
- TextWrapping="Wrap"
- Visibility="Collapsed">
- The email is invalid.Please enter a valid email address.
- </TextBlock>
- </StackPanel>
- </Grid>
- <Button
- x:Name="BtnGOorBack"
- Background="Transparent"
- BorderThickness="0"
- Content="GO"
- FontSize="16"
- Foreground="#1770F4"
- Style="{StaticResource Btn.cta}"
- Visibility="{Binding BtnGOorBackVisibility}" />
- </StackPanel>
- </Grid>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Loaded">
- <helper:AdvancedInvokeCommandAction
- Command="{Binding LoadedCommand}"
- CommandParameter="{Binding ElementName=LinkAnnotPropertyContent}"
- PassEventArgsToCommand="True">
- <!--<helper:AdvancedInvokeCommandAction.CommandParameter>
- <MultiBinding Converter="{StaticResource ResourceKey=ObjectConvert}" Mode="TwoWay">
- <MultiBinding.Bindings>
- <Binding ElementName="ImagePreview" />
- <Binding ElementName="LinkPagePanel" />
- <Binding ElementName="LinkWebPanel" />
- <Binding ElementName="LinkMailPanel" />
- <Binding ElementName="LinkPagePanel" />
- <Binding ElementName="LinkPagePanel" />
- <Binding ElementName="LinkPagePanel" />
- </MultiBinding.Bindings>
- </MultiBinding>
- </helper:AdvancedInvokeCommandAction.CommandParameter>-->
- </helper:AdvancedInvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </UserControl>
|