AnnotationControl.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.AnnotationControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. mc:Ignorable="d"
  7. xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl"
  8. xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
  9. Loaded="MainWindow_Loaded"
  10. d:DesignHeight="720" d:DesignWidth="1080">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
  15. <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
  16. <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="*"></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <Grid Name="BodyGrid" Grid.Row="1">
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="auto"/>
  28. <RowDefinition Height="*"/>
  29. </Grid.RowDefinitions>
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="0"></ColumnDefinition>
  32. <ColumnDefinition Width="0"></ColumnDefinition>
  33. <ColumnDefinition Width="*"></ColumnDefinition>
  34. <ColumnDefinition Width="auto"></ColumnDefinition>
  35. </Grid.ColumnDefinitions>
  36. <Border x:Name="ToolBarContainer" Height="45" Visibility="Visible" BorderThickness="1" BorderBrush="#1A000000" Background="#F2F3F5" Grid.ColumnSpan="4">
  37. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  38. <cpdftools:CPDFAnnotationBarControl x:Name="AnnotationBarControl" Loaded="AnnotationBarControl_Loaded" Unloaded="AnnotationBarControl_Unloaded" Height="44"/>
  39. <Line Height="40" Stroke="#D5D6D8" StrokeThickness="2" X1="0" Y1="10" X2="0" Y2="30" Margin="8,0,8,0" />
  40. <Button Name="UndoBtn" Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" IsEnabled="{Binding CanUndo,Mode=OneWay}" Click="UndoButton_Click"
  41. Background="Transparent">
  42. <Path x:Name="UndoPath" IsEnabled="{Binding CanUndo,Mode=OneWay}">
  43. <Path.Style>
  44. <Style TargetType="Path">
  45. <Style.Triggers>
  46. <Trigger Property="IsEnabled" Value="False">
  47. <Setter Property="Fill" Value="LightGray"/>
  48. </Trigger>
  49. <Trigger Property="IsEnabled" Value="True">
  50. <Setter Property="Fill" Value="#43474D"/>
  51. </Trigger>
  52. </Style.Triggers>
  53. </Style>
  54. </Path.Style>
  55. <Path.Data>
  56. M1.03033 3.62131L0.5 4.15164L1.03033 4.68197L4.65164 8.30328L5.7123 7.24261L3.37132 4.90164H10.0607C11.5794 4.90164 12.8107 6.13285 12.8107
  57. 7.65164C12.8107 9.17042 11.5794 10.4016 10.0607 10.4016H2.56066V11.9016H10.0607C12.4079 11.9016 14.3107 9.99885 14.3107 7.65164C14.3107
  58. 5.30443 12.4079 3.40164 10.0607 3.40164H3.37132L5.7123 1.06066L4.65164 0L1.03033 3.62131Z
  59. </Path.Data>
  60. </Path>
  61. <Button.ToolTip>
  62. <ToolTip Content="Undo"></ToolTip>
  63. </Button.ToolTip>
  64. </Button>
  65. <Button Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" Margin="10,0,0,0" IsEnabled="{Binding CanRedo,Mode=OneWay}" Click="RedoButton_Click"
  66. Background="Transparent">
  67. <Path IsEnabled="{Binding CanRedo,Mode=OneWay}">
  68. <Path.Resources>
  69. <Style TargetType="Path">
  70. <Style.Triggers>
  71. <Trigger Property="IsEnabled" Value="False">
  72. <Setter Property="Fill" Value="LightGray"/>
  73. </Trigger>
  74. <Trigger Property="IsEnabled" Value="True">
  75. <Setter Property="Fill" Value="#43474D"/>
  76. </Trigger>
  77. </Style.Triggers>
  78. </Style>
  79. </Path.Resources>
  80. <Path.Data>
  81. M13.7802 3.62131L14.3105 4.15164L13.7802 4.68197L10.1589 8.30328L9.09825 7.24261L11.4392 4.90164H4.74989C3.2311 4.90164 1.99989 6.13285
  82. 1.99989 7.65164C1.99989 9.17042 3.2311 10.4016 4.74989 10.4016H12.2499V11.9016H4.74989C2.40268 11.9016 0.499887 9.99885 0.499887
  83. 7.65164C0.499887 5.30443 2.40268 3.40164 4.74989 3.40164H11.4392L9.09825 1.06066L10.1589 0L13.7802 3.62131Z
  84. </Path.Data>
  85. </Path>
  86. <Button.ToolTip>
  87. <ToolTip Content="Redo"></ToolTip>
  88. </Button.ToolTip>
  89. </Button>
  90. </StackPanel>
  91. </Border>
  92. <Border Grid.Row="1" Visibility="Collapsed" Name="BotaContainer">
  93. </Border>
  94. <GridSplitter Grid.Row="1" Name="Splitter" Grid.Column="1" Width="15" ResizeBehavior="PreviousAndNext" Visibility="Collapsed">
  95. <GridSplitter.Template>
  96. <ControlTemplate TargetType="{x:Type GridSplitter}">
  97. <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  98. BorderBrush="{TemplateBinding Border.BorderBrush}"
  99. Background="{TemplateBinding Panel.Background}" >
  100. <Path Fill="Gray" VerticalAlignment="Center">
  101. <Path.Data>
  102. M15 3.75H1V2.25H15V3.75ZM15 8.75H1V7.25H15V8.75ZM1 13.75H15V12.25H1V13.75Z
  103. </Path.Data>
  104. </Path>
  105. </Border>
  106. </ControlTemplate>
  107. </GridSplitter.Template>
  108. </GridSplitter>
  109. <Grid Grid.Row="1" Grid.Column="2" >
  110. <Grid.RowDefinitions>
  111. <RowDefinition Height="auto"/>
  112. <RowDefinition Height="*"/>
  113. </Grid.RowDefinitions>
  114. <Grid Grid.Row="1">
  115. <Grid.ColumnDefinitions>
  116. <ColumnDefinition></ColumnDefinition>
  117. <ColumnDefinition Width="auto"></ColumnDefinition>
  118. </Grid.ColumnDefinitions>
  119. <Border x:Name="PDFGrid" Background="#CECECE"></Border>
  120. <Border Grid.Column="1" Grid.RowSpan="2" Name="PropertyContainer" Visibility="Collapsed"></Border>
  121. </Grid>
  122. <cpdfcommon:PageNumberControl Grid.Row="1" x:Name="FloatPageTool" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20"></cpdfcommon:PageNumberControl>
  123. </Grid>
  124. </Grid>
  125. </Grid>
  126. <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed">
  127. <Grid>
  128. <Grid Name="FileInfoUI" Width="422" Height="680" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White" Visibility="Collapsed">
  129. <Grid.ColumnDefinitions>
  130. <ColumnDefinition Width="*"></ColumnDefinition>
  131. <ColumnDefinition Width="*"></ColumnDefinition>
  132. </Grid.ColumnDefinitions>
  133. <Grid.RowDefinitions>
  134. <RowDefinition Height="auto"></RowDefinition>
  135. <RowDefinition Height="*"></RowDefinition>
  136. </Grid.RowDefinitions>
  137. <TextBlock Width="50" Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">FileInfo:</TextBlock>
  138. <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0" Click="FileInfoCloseBtn_Click">
  139. <Button.Content>
  140. <Path Fill="Black">
  141. <Path.Data>
  142. M6.69495 6L11.5 1.19495L10.805 0.5L6 5.30505L1.19495 0.5L0.5 1.19495L5.30505 6L0.5 10.805L1.19495 11.5L6 6.69495L10.805 11.5L11.5 10.805L6.69495 6Z
  143. </Path.Data>
  144. </Path>
  145. </Button.Content>
  146. </Button>
  147. <cpdftools:CPDFInfoControl Grid.Row="1" Margin="25,10,25,0" Grid.ColumnSpan="2" x:Name="FileInfoControl"></cpdftools:CPDFInfoControl>
  148. </Grid>
  149. <cpdfcommon:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"></cpdfcommon:PasswordDialog>
  150. </Grid>
  151. </Border>
  152. </Grid>
  153. </UserControl>