MainPage.xaml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <UserControl x:Class="PDFViewer.MainPage"
  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. xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
  7. xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common;assembly=Compdfkit_Tools"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800"
  10. Loaded="UserControl_Loaded">
  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. <!-- Shortcut -->
  19. <RoutedUICommand x:Key="Open" Text="Open"/>
  20. <RoutedUICommand x:Key="Save" Text="Right rotate"/>
  21. <RoutedUICommand x:Key="SaveAs" Text="Delete"/>
  22. <RoutedUICommand x:Key="Undo" Text="Undo"/>
  23. <RoutedUICommand x:Key="Redo" Text="Redo"/>
  24. <RoutedUICommand x:Key="ControlLeftPanel" Text="Control left panel"/>
  25. <RoutedUICommand x:Key="ControlRightPanel" Text="Control right panel"/>
  26. <RoutedUICommand x:Key="GoToBookmark" Text="Go to bookmark"></RoutedUICommand>
  27. <RoutedUICommand x:Key="GoToOutline" Text="Go to outline"></RoutedUICommand>
  28. <RoutedUICommand x:Key="GoToThumbnail" Text="Go to thumbnail"></RoutedUICommand>
  29. <RoutedUICommand x:Key="GoToAnnotationList" Text="Go to annotation list"></RoutedUICommand>
  30. <RoutedUICommand x:Key="GoToSearch" Text="Go to search"></RoutedUICommand>
  31. <RoutedUICommand x:Key="ScaleAdd" Text="Scale add"></RoutedUICommand>
  32. <RoutedUICommand x:Key="ScaleSubtract" Text="Scale reduce"></RoutedUICommand>
  33. <RoutedUICommand x:Key="DisplaySettings" Text="Display settings"></RoutedUICommand>
  34. <RoutedUICommand x:Key="DocumentInfo" Text="Document infomation"></RoutedUICommand>
  35. <RoutedUICommand x:Key="Highlight" Text="Highlight"></RoutedUICommand>
  36. <RoutedUICommand x:Key="Underline" Text="Underline"></RoutedUICommand>
  37. <RoutedUICommand x:Key="Strikeout" Text="Strikeout"></RoutedUICommand>
  38. <RoutedUICommand x:Key="Squiggly" Text="Squiggly"></RoutedUICommand>
  39. </ResourceDictionary>
  40. </UserControl.Resources>
  41. <UserControl.CommandBindings>
  42. <CommandBinding Command="{StaticResource Open}" Executed="CommandBinding_Executed_Open"/>
  43. <CommandBinding Command="{StaticResource Save}" Executed="CommandBinding_Executed_Save"/>
  44. <CommandBinding Command="{StaticResource SaveAs}" Executed="CommandBinding_Executed_SaveAs"/>
  45. <CommandBinding Command="{StaticResource Undo}" Executed="CommandBinding_Executed_Undo"/>
  46. <CommandBinding Command="{StaticResource Redo}" Executed="CommandBinding_Executed_Redo"/>
  47. <CommandBinding Command="{StaticResource ControlLeftPanel}" Executed="CommandBinding_Executed_ControlLeftPanel"></CommandBinding>
  48. <CommandBinding Command="{StaticResource ControlRightPanel}" Executed="CommandBinding_Executed_ControlRightPanel"></CommandBinding>
  49. <CommandBinding Command="{StaticResource GoToBookmark}" Executed="CommandBinding_Executed_Bookmark"></CommandBinding>
  50. <CommandBinding Command="{StaticResource GoToOutline}" Executed="CommandBinding_Executed_Outline"></CommandBinding>
  51. <CommandBinding Command="{StaticResource GoToThumbnail}" Executed="CommandBinding_Executed_Thumbnail"></CommandBinding>
  52. <CommandBinding Command="{StaticResource GoToAnnotationList}" Executed="CommandBinding_Executed_Annotation"></CommandBinding>
  53. <CommandBinding Command="{StaticResource GoToSearch}" Executed="CommandBinding_Executed_Search"></CommandBinding>
  54. <CommandBinding Command="{StaticResource ScaleAdd}" Executed="CommandBinding_Executed_ScaleAdd"></CommandBinding>
  55. <CommandBinding Command="{StaticResource ScaleSubtract}" Executed="CommandBinding_Executed_ScaleSubtract"></CommandBinding>
  56. <CommandBinding Command="{StaticResource DisplaySettings}" Executed="CommandBinding_Executed_DisplaySettings"></CommandBinding>
  57. <CommandBinding Command="{StaticResource DocumentInfo}" Executed="CommandBinding_Executed_DocumentInfo"></CommandBinding>
  58. <CommandBinding Command="{StaticResource Highlight}" Executed="CommandBinding_Executed_Highlight"></CommandBinding>
  59. <CommandBinding Command="{StaticResource Underline}" Executed="CommandBinding_Executed_Underline"></CommandBinding>
  60. <CommandBinding Command="{StaticResource Strikeout}" Executed="CommandBinding_Executed_Strikeout"></CommandBinding>
  61. <CommandBinding Command="{StaticResource Squiggly}" Executed="CommandBinding_Executed_Squiggly"></CommandBinding>
  62. </UserControl.CommandBindings>
  63. <UserControl.InputBindings>
  64. <KeyBinding Key="O" Modifiers="Control" Command="{StaticResource Open}"/>
  65. <KeyBinding Key="S" Modifiers="Control" Command="{StaticResource Save}"/>
  66. <KeyBinding Key="S" Modifiers="Control+Shift" Command="{StaticResource SaveAs}"/>
  67. <KeyBinding Key="Z" Modifiers="Control" Command="{StaticResource Undo}"/>
  68. <KeyBinding Key="Y" Modifiers="Control" Command="{StaticResource Redo}"/>
  69. <KeyBinding Key="F4" Command="{StaticResource ControlLeftPanel}"/>
  70. <KeyBinding Key="F4" Modifiers="Control" Command="{StaticResource ControlRightPanel}"/>
  71. <KeyBinding Key="B" Modifiers="Control" Command="{StaticResource GoToBookmark}"></KeyBinding>
  72. <KeyBinding Key="O" Modifiers="Control+Shift" Command="{StaticResource GoToOutline}"></KeyBinding>
  73. <KeyBinding Key="T" Modifiers="Control" Command="{StaticResource GoToThumbnail}"></KeyBinding>
  74. <KeyBinding Key="A" Modifiers="Control" Command="{StaticResource GoToAnnotationList}"></KeyBinding>
  75. <KeyBinding Key="F" Modifiers="Control" Command="{StaticResource GoToSearch}"></KeyBinding>
  76. <KeyBinding Key="Add" Modifiers="Control" Command="{StaticResource ScaleAdd}"></KeyBinding>
  77. <KeyBinding Key="OemPlus" Modifiers="Control" Command="{StaticResource ScaleAdd}"></KeyBinding>
  78. <KeyBinding Key="Subtract" Modifiers="Control" Command="{StaticResource ScaleSubtract}"></KeyBinding>
  79. <KeyBinding Key="OemMinus" Modifiers="Control" Command="{StaticResource ScaleSubtract}"></KeyBinding>
  80. <KeyBinding Key="D" Modifiers="Control" Command="{StaticResource DisplaySettings}"></KeyBinding>
  81. <KeyBinding Key="I" Modifiers="Control" Command="{StaticResource DocumentInfo}"></KeyBinding>
  82. <KeyBinding Key="H" Modifiers="Control+Alt" Command="{StaticResource Highlight}"></KeyBinding>
  83. <KeyBinding Key="U" Modifiers="Control+Alt" Command="{StaticResource Underline}"></KeyBinding>
  84. <KeyBinding Key="Q" Modifiers="Control+Alt" Command="{StaticResource Squiggly}"></KeyBinding>
  85. <KeyBinding Key="S" Modifiers="Control+Alt" Command="{StaticResource Strikeout}"></KeyBinding>
  86. </UserControl.InputBindings>
  87. <Grid>
  88. <Grid.RowDefinitions>
  89. <RowDefinition Height="auto"></RowDefinition>
  90. <RowDefinition Height="40"></RowDefinition>
  91. <RowDefinition Height="*"></RowDefinition>
  92. </Grid.RowDefinitions>
  93. <cpdftools:CPDFTitleBarControl x:Name="CPDFTitleBarControl" Visibility="Visible" Loaded="CPDFTitleBarControl_Loaded" CanSave="{Binding CanSave,Mode=OneWay}" Margin="2 0 0 0"></cpdftools:CPDFTitleBarControl>
  94. <Grid Grid.Row="1">
  95. <Grid.ColumnDefinitions>
  96. <ColumnDefinition Width="auto"></ColumnDefinition>
  97. <ColumnDefinition Width="*"></ColumnDefinition>
  98. <ColumnDefinition Width="auto"></ColumnDefinition>
  99. </Grid.ColumnDefinitions>
  100. <Border Height="1" Background="LightGray" VerticalAlignment="Bottom" Grid.ColumnSpan="3"/>
  101. <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
  102. <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="OpenFile_Click">
  103. <Button.Content>
  104. <Viewbox Width="20" Height="20">
  105. <Path Fill="#43474D" >
  106. <Path.Data>
  107. M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792
  108. 4.67578125,2.18489583 4.80859375,2.2578125 C4.94140625,2.33072917 5.05989583,2.41145833 5.1640625,2.5 C5.26822917,2.58854167
  109. 5.37369792,2.66927083 5.48046875,2.7421875 C5.58723958,2.81510417 5.70182292,2.87630208 5.82421875,2.92578125 C5.94661458,2.97526042
  110. 6.08854167,3 6.25,3 L6.25,3 L12,3 L12.1371528,3.00868056 C12.2262731,3.02025463 12.3107639,3.04340278 12.390625,3.078125
  111. C12.5104167,3.13020833 12.6158854,3.20182292 12.7070312,3.29296875 C12.7981771,3.38411458 12.8697917,3.48958333 12.921875,3.609375
  112. C12.9739583,3.72916667 13,3.859375 13,4 L13,4 L13,6 L15,6 L15.1332465,6.00868056 C15.2206308,6.02025463 15.3051215,6.04340278
  113. 15.3867188,6.078125 C15.5091146,6.13020833 15.6158854,6.20182292 15.7070312,6.29296875 C15.7981771,6.38411458 15.8697917,6.48958333
  114. 15.921875,6.609375 C15.9739583,6.72916667 16,6.85677083 16,6.9921875 C16,7.1484375 15.9635417,7.29947917 15.890625,7.4453125
  115. L15.890625,7.4453125 L12.6171875,14 L0,14 L0,3 L0.00868055556,2.86284722 C0.0202546296,2.77372685 0.0434027778,2.68923611 0.078125,2.609375
  116. C0.130208333,2.48958333 0.201822917,2.38411458 0.29296875,2.29296875 C0.384114583,2.20182292 0.489583333,2.13020833 0.609375,2.078125
  117. C0.729166667,2.02604167 0.859375,2 1,2 L1,2 L3.75,2 Z M15,7 L4.3125,7 L1.3125,13 L12,13 L15,7 Z M3.75,3 L1,3 L1,11.3828125 L3.4140625,6.5546875
  118. L3.48706055,6.43261719 C3.56665039,6.31738281 3.66601562,6.22265625 3.78515625,6.1484375 C3.94401042,6.04947917 4.11979167,6 4.3125,6
  119. L4.3125,6 L12,6 L12,4 L6.25,4 L6.08032227,3.99536133 C5.91674805,3.98608398 5.77148438,3.96289062 5.64453125,3.92578125 C5.47526042,3.87630208
  120. 5.32421875,3.81510417 5.19140625,3.7421875 C5.05859375,3.66927083 4.94010417,3.58854167 4.8359375,3.5 C4.73177083,3.41145833 4.62630208,3.33072917
  121. 4.51953125,3.2578125 C4.41276042,3.18489583 4.29817708,3.12369792 4.17578125,3.07421875 C4.05338542,3.02473958 3.91145833,3 3.75,3 L3.75,3 Z
  122. </Path.Data>
  123. </Path>
  124. </Viewbox>
  125. </Button.Content>
  126. <Button.ToolTip>
  127. <ToolTip Content="Open...(Ctrl+O)"></ToolTip>
  128. </Button.ToolTip>
  129. </Button>
  130. <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent"
  131. Click="SaveFileBtn_Click" IsEnabled="{Binding CanSave,Mode=OneWay}">
  132. <Button.Content>
  133. <Viewbox Width="20" Height="20">
  134. <Path IsEnabled="{Binding CanSave,Mode=OneWay}">
  135. <Path.Style>
  136. <Style TargetType="Path">
  137. <Style.Triggers>
  138. <Trigger Property="IsEnabled" Value="False">
  139. <Setter Property="Fill" Value="LightGray"/>
  140. </Trigger>
  141. <Trigger Property="IsEnabled" Value="True">
  142. <Setter Property="Fill" Value="#43474D"/>
  143. </Trigger>
  144. </Style.Triggers>
  145. </Style>
  146. </Path.Style>
  147. <Path.Data>
  148. M11.707107,1 L15,4.29289322 L15,15 L1,15 L1,1 L11.707107,1 Z M11.293,2 L2,2 L2,14 L4,14 L4,8 L12,8 L12,14 L14,14 L14,4.707 L11.293,2 Z
  149. M11,9 L5,9 L5,14 L11,14 L11,9 Z M7,5 L7,6 L4,6 L4,5 L7,5 Z
  150. </Path.Data>
  151. </Path>
  152. </Viewbox>
  153. </Button.Content>
  154. <Button.ToolTip>
  155. <ToolTip Content="Save(Ctrl+S)"></ToolTip>
  156. </Button.ToolTip>
  157. </Button>
  158. <ToggleButton x:Name="LeftToolPanelButton" Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="LeftToolPanelButton_Click">
  159. <ToggleButton.Content>
  160. <Path Fill="#43474D" Width="30" Height="30">
  161. <Path.Data>
  162. M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
  163. </Path.Data>
  164. </Path>
  165. </ToggleButton.Content>
  166. <ToggleButton.ToolTip>
  167. <ToolTip Content="BOTAS Panel(F4)"></ToolTip>
  168. </ToggleButton.ToolTip>
  169. </ToggleButton>
  170. <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
  171. <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"></cpdftools:CPDFScalingControl>
  172. </StackPanel>
  173. <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="140" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectedIndex="0" SelectionChanged="ComboBox_SelectionChanged">
  174. <ComboBoxItem>Viewer</ComboBoxItem>
  175. <ComboBoxItem>Annotations</ComboBoxItem>
  176. <ComboBoxItem>Content Editor</ComboBoxItem>
  177. <ComboBoxItem>Forms</ComboBoxItem>
  178. <ComboBoxItem>Docs Editor</ComboBoxItem>
  179. </ComboBox>
  180. <StackPanel Orientation="Horizontal" Grid.Column="2">
  181. <Button x:Name="SearchButton" BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="ExpandSearchBtn_Click">
  182. <Button.Content>
  183. <Path Fill="#43474D">
  184. <Path.Data>
  185. M5.10992 13.9353C2.71184 11.5372 2.71184 7.64917 5.10992 5.25108C7.50801 2.853 11.3961 2.853 13.7942 5.25108C16.1922 7.64917
  186. 16.1922 11.5372 13.7942 13.9353C11.3961 16.3334 7.50801 16.3334 5.10992 13.9353ZM4.04926 4.19042C1.06539 7.17429 1.06539 12.0121
  187. 4.04926 14.996C6.85422 17.8009 11.2975 17.9691 14.2989 15.5005L17.1989 18.4006C17.4918 18.6935 17.9667 18.6935 18.2596
  188. 18.4006C18.5525 18.1077 18.5525 17.6328 18.2596 17.3399L15.3595 14.4399C17.828 11.4384 17.6597 6.99533 14.8548
  189. 4.19042C11.8709 1.20655 7.03313 1.20655 4.04926 4.19042Z
  190. </Path.Data>
  191. </Path>
  192. </Button.Content>
  193. <Button.ToolTip>
  194. <ToolTip Content="Search(Ctrl+F)"></ToolTip>
  195. </Button.ToolTip>
  196. </Button>
  197. <ToggleButton Name="ViewSettingBtn" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ViewSettingBtn_Click">
  198. <ToggleButton.Content>
  199. <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
  200. <Path.Data>
  201. <CombinedGeometry GeometryCombineMode="Exclude">
  202. <CombinedGeometry.Geometry1>
  203. M18.3327 10C18.3327 10 14.6017 16.25 9.99935 16.25C5.39698 16.25 1.66602 10 1.66602 10C1.66602 10 5.39698 3.75 9.99935 3.75C14.6017 3.75 18.3327 10 18.3327 10Z
  204. </CombinedGeometry.Geometry1>
  205. <CombinedGeometry.Geometry2>
  206. <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
  207. </CombinedGeometry.Geometry2>
  208. </CombinedGeometry>
  209. </Path.Data>
  210. </Path>
  211. </ToggleButton.Content>
  212. <ToggleButton.ToolTip>
  213. <ToolTip Content="Page Display(Ctrl+D)"></ToolTip>
  214. </ToggleButton.ToolTip>
  215. </ToggleButton>
  216. <ToggleButton x:Name="RightPanelButton" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="RightPanelButton_Click">
  217. <ToggleButton.Content>
  218. <Path Fill="#43474D" Width="30" Height="30">
  219. <Path.Data>
  220. M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
  221. </Path.Data>
  222. </Path>
  223. </ToggleButton.Content>
  224. <ToggleButton.ToolTip>
  225. <ToolTip Content="Properties Panel(Ctrl+F4)"></ToolTip>
  226. </ToggleButton.ToolTip>
  227. </ToggleButton>
  228. <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="PageInfoBtn_Click">
  229. <Button.Content>
  230. <Path Fill="#43474D" VerticalAlignment="Center">
  231. <Path.Data>
  232. M2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10C17.25 14.0041 14.0041 17.25 10
  233. 17.25C5.99594 17.25 2.75 14.0041 2.75 10ZM10 1.25C5.16751 1.25 1.25 5.16751 1.25 10C1.25 14.8325 5.16751
  234. 18.75 10 18.75C14.8325 18.75 18.75 14.8325 18.75 10C18.75 5.16751 14.8325 1.25 10 1.25ZM6.5 11C7.05228 11
  235. 7.5 10.5523 7.5 10C7.5 9.44771 7.05228 9 6.5 9C5.94772 9 5.5 9.44771 5.5 10C5.5 10.5523 5.94772 11 6.5 11ZM10
  236. 11C10.5523 11 11 10.5523 11 10C11 9.44771 10.5523 9 10 9C9.44771 9 9 9.44771 9 10C9 10.5523 9.44771 11 10 11ZM14.5
  237. 10C14.5 10.5523 14.0523 11 13.5 11C12.9477 11 12.5 10.5523 12.5 10C12.5 9.44771 12.9477 9 13.5 9C14.0523 9 14.5 9.44771 14.5 10Z
  238. </Path.Data>
  239. </Path>
  240. </Button.Content>
  241. <Button.ToolTip>
  242. <ToolTip Content="Document Info(Ctrl+I)"></ToolTip>
  243. </Button.ToolTip>
  244. </Button>
  245. </StackPanel>
  246. </Grid>
  247. <Grid Name="BodyGrid" Grid.Row="2" Grid.ColumnSpan="2">
  248. <Grid.RowDefinitions>
  249. <RowDefinition Height="auto"/>
  250. <RowDefinition Height="*"/>
  251. </Grid.RowDefinitions>
  252. <Grid.ColumnDefinitions>
  253. <ColumnDefinition Width="0"></ColumnDefinition>
  254. <ColumnDefinition Width="0"></ColumnDefinition>
  255. <ColumnDefinition Width="*"></ColumnDefinition>
  256. <ColumnDefinition Width="auto"></ColumnDefinition>
  257. </Grid.ColumnDefinitions>
  258. <Border x:Name="ToolBarContainer" Height="46" Visibility="Collapsed" BorderThickness="1" BorderBrush="#1A000000" Background="#F2F3F5" Grid.ColumnSpan="4">
  259. <Grid>
  260. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  261. <Grid>
  262. <cpdftools:CPDFPageEditBarControl x:Name="PageEditBarControl" Height="44" Visibility="Collapsed"></cpdftools:CPDFPageEditBarControl>
  263. <cpdftools:CPDFAnnotationBarControl x:Name="AnnotationBarControl" Height="44" Loaded="AnnotationBarControl_Loaded" Unloaded="AnnotationBarControl_Unloaded" Visibility="Collapsed"/>
  264. <cpdftools:CPDFFormBarControl x:Name="FormBarControl" Height="44" Visibility="Collapsed"></cpdftools:CPDFFormBarControl>
  265. <Border Name="PDFEditTool" Background="#F2F3F5" Visibility="Collapsed">
  266. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  267. <ToggleButton Style="{StaticResource ToggleButtonStyle}" Name="PDFTextEditButton" BorderThickness="0" Padding="10,5,10,5" Click="PDFTextEditButton_Click" Width="99" Height="40">
  268. <StackPanel Orientation="Horizontal">
  269. <Path Fill="#273C62" VerticalAlignment="Center">
  270. <Path.Data>
  271. M1.25 0H0.5V0.75V13.25V14H1.25H17.75H18.5V13.25V7H17V12.5H2V1.5H12.5V0H1.25ZM11.5 5V2.5H3.5V5H5V4H6.75V10H6V11.5H9V10H8.25V4H10V5H11.5ZM15.75
  272. 3.75H13.5V2.25H15.75V0H17.25V2.25H19.5V3.75H17.25V6H15.75V3.75Z
  273. </Path.Data>
  274. </Path>
  275. <TextBlock FontSize="12" VerticalAlignment="Center" Margin="8,0,0,0">Text</TextBlock>
  276. </StackPanel>
  277. <ToggleButton.ToolTip>
  278. <ToolTip Content="Text"></ToolTip>
  279. </ToggleButton.ToolTip>
  280. </ToggleButton>
  281. <ToggleButton Style="{StaticResource ToggleButtonStyle}" Name="PDFImageEditButton" BorderThickness="0" Padding="10,5,10,5" Margin="10,0,0,0" Click="PDFImageEditButton_Click">
  282. <StackPanel Orientation="Horizontal">
  283. <Path Fill="#273C62" VerticalAlignment="Center">
  284. <Path.Data>
  285. M1.5 0H0.75V0.75V13.25V14H1.5H18H18.75V13.25V7H17.25V12.5H17.2147L11.8718 7.81776L9.56428 10.25L5.29496 6.75L2.25 9.95948V1.5H12.75V0H1.5ZM13.5 5.25C13.5
  286. 6.07843 12.8284 6.75 12 6.75C11.1716 6.75 10.5 6.07843 10.5 5.25C10.5 4.42157 11.1716 3.75 12 3.75C12.8284 3.75 13.5 4.42157 13.5 5.25ZM15.75
  287. 3.75H13.5V2.25H15.75V0H17.25V2.25H19.5V3.75H17.25V6H15.75V3.75Z
  288. </Path.Data>
  289. </Path>
  290. <TextBlock FontSize="12" VerticalAlignment="Center" Margin="8,0,0,0">Picture</TextBlock>
  291. </StackPanel>
  292. <ToggleButton.ToolTip>
  293. <ToolTip Content="Image"></ToolTip>
  294. </ToggleButton.ToolTip>
  295. </ToggleButton>
  296. </StackPanel>
  297. </Border>
  298. </Grid>
  299. <StackPanel x:Name="UndoRedoStackPanel" Orientation="Horizontal" Visibility="Visible">
  300. <Line Height="40" Stroke="#D5D6D8" StrokeThickness="2" X1="0" Y1="10" X2="0" Y2="30" Margin="8,0,8,0" />
  301. <Button Name="UndoBtn" Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" IsEnabled="{Binding CanUndo,Mode=OneWay}" Click="UndoBtn_Click"
  302. Background="Transparent">
  303. <Path x:Name="UndoPath" IsEnabled="{Binding CanUndo,Mode=OneWay}">
  304. <Path.Style>
  305. <Style TargetType="Path">
  306. <Style.Triggers>
  307. <Trigger Property="IsEnabled" Value="False">
  308. <Setter Property="Fill" Value="LightGray"/>
  309. </Trigger>
  310. <Trigger Property="IsEnabled" Value="True">
  311. <Setter Property="Fill" Value="#43474D"/>
  312. </Trigger>
  313. </Style.Triggers>
  314. </Style>
  315. </Path.Style>
  316. <Path.Data>
  317. 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
  318. 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
  319. 5.30443 12.4079 3.40164 10.0607 3.40164H3.37132L5.7123 1.06066L4.65164 0L1.03033 3.62131Z
  320. </Path.Data>
  321. </Path>
  322. <Button.ToolTip>
  323. <ToolTip Content="Undo(Ctrl+Z)"></ToolTip>
  324. </Button.ToolTip>
  325. </Button>
  326. <Button Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" Margin="10,0,0,0" IsEnabled="{Binding CanRedo,Mode=OneWay}" Click="RedoBtn_Click"
  327. Background="Transparent">
  328. <Path IsEnabled="{Binding CanRedo,Mode=OneWay}">
  329. <Path.Resources>
  330. <Style TargetType="Path">
  331. <Style.Triggers>
  332. <Trigger Property="IsEnabled" Value="False">
  333. <Setter Property="Fill" Value="LightGray"/>
  334. </Trigger>
  335. <Trigger Property="IsEnabled" Value="True">
  336. <Setter Property="Fill" Value="#43474D"/>
  337. </Trigger>
  338. </Style.Triggers>
  339. </Style>
  340. </Path.Resources>
  341. <Path.Data>
  342. 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
  343. 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
  344. 7.65164C0.499887 5.30443 2.40268 3.40164 4.74989 3.40164H11.4392L9.09825 1.06066L10.1589 0L13.7802 3.62131Z
  345. </Path.Data>
  346. </Path>
  347. <Button.ToolTip>
  348. <ToolTip Content="Redo(Ctrl+Y)"></ToolTip>
  349. </Button.ToolTip>
  350. </Button>
  351. </StackPanel>
  352. </StackPanel>
  353. </Grid>
  354. </Border>
  355. <cpdftools:CPDFBOTABarControl Grid.Row="1" Visibility="Collapsed" Name="BotaSideTool"/>
  356. <GridSplitter Name="Splitter" Grid.Row="1" Grid.Column="1" Width="15" ResizeBehavior="PreviousAndNext" Visibility="Collapsed">
  357. <GridSplitter.Template>
  358. <ControlTemplate TargetType="{x:Type GridSplitter}">
  359. <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  360. BorderBrush="{TemplateBinding Border.BorderBrush}"
  361. Background="{TemplateBinding Panel.Background}" >
  362. <Path Fill="Gray" VerticalAlignment="Center">
  363. <Path.Data>
  364. M15 3.75H1V2.25H15V3.75ZM15 8.75H1V7.25H15V8.75ZM1 13.75H15V12.25H1V13.75Z
  365. </Path.Data>
  366. </Path>
  367. </Border>
  368. </ControlTemplate>
  369. </GridSplitter.Template>
  370. </GridSplitter>
  371. <Grid Grid.Row="1" Grid.Column="2" >
  372. <Grid.RowDefinitions>
  373. <RowDefinition Height="auto"/>
  374. <RowDefinition Height="*"/>
  375. </Grid.RowDefinitions>
  376. <Grid Grid.Row="1">
  377. <Grid.ColumnDefinitions>
  378. <ColumnDefinition></ColumnDefinition>
  379. <ColumnDefinition Width="auto"></ColumnDefinition>
  380. </Grid.ColumnDefinitions>
  381. <Border x:Name="PDFGrid" Background="#CECECE"></Border>
  382. <cpdfcommon:PageNumberControl Grid.Row="1" Name="FloatPageTool" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20"></cpdfcommon:PageNumberControl>
  383. <Grid Grid.Column="1">
  384. <TextBlock x:Name="EmptyMessage" Text="The property panel is empty." Visibility="{Binding ElementName=PropertyContainer, Path=Visibility}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  385. <Border Name="PropertyContainer" Visibility="Collapsed"></Border>
  386. </Grid>
  387. </Grid>
  388. </Grid>
  389. </Grid>
  390. <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed" Grid.RowSpan="3" Grid.ColumnSpan="2">
  391. <Grid>
  392. <cpdftools:CPDFInfoControl x:Name="CPDFInfoControl" Visibility="Collapsed"></cpdftools:CPDFInfoControl>
  393. <cpdfcommon:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"></cpdfcommon:PasswordDialog>
  394. </Grid>
  395. </Border>
  396. </Grid>
  397. </UserControl>