MainWindow.xaml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <Window x:Class="viewer_ctrl_demo.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:viewer_ctrl_demo"
  7. xmlns:cpdftools="clr-namespace:compdfkit_tools.PDFControl;assembly=com.compdfkit.tools"
  8. mc:Ignorable="d"
  9. Loaded="MainWindow_Loaded"
  10. Title="Annotation" Height="960" Width="1280" WindowStartupLocation="CenterScreen">
  11. <Window.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
  15. <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ButtonStyle.xaml"></ResourceDictionary>
  16. <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </Window.Resources>
  20. <Grid>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="40"></RowDefinition>
  24. <RowDefinition Height="*"></RowDefinition>
  25. </Grid.RowDefinitions>
  26. <!--顶部工具栏-->
  27. <Grid>
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="auto"></ColumnDefinition>
  30. <ColumnDefinition Width="*"></ColumnDefinition>
  31. <ColumnDefinition Width="auto"></ColumnDefinition>
  32. </Grid.ColumnDefinitions>
  33. <!--左侧工具栏-->
  34. <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
  35. <!--打开文件-->
  36. <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="OpenFile_Click">
  37. <Button.Content>
  38. <Viewbox Width="20" Height="20">
  39. <Path Fill="#43474D" >
  40. <Path.Data>
  41. M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792
  42. 4.67578125,2.18489583 4.80859375,2.2578125 C4.94140625,2.33072917 5.05989583,2.41145833 5.1640625,2.5 C5.26822917,2.58854167
  43. 5.37369792,2.66927083 5.48046875,2.7421875 C5.58723958,2.81510417 5.70182292,2.87630208 5.82421875,2.92578125 C5.94661458,2.97526042
  44. 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
  45. C12.5104167,3.13020833 12.6158854,3.20182292 12.7070312,3.29296875 C12.7981771,3.38411458 12.8697917,3.48958333 12.921875,3.609375
  46. 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
  47. 15.3867188,6.078125 C15.5091146,6.13020833 15.6158854,6.20182292 15.7070312,6.29296875 C15.7981771,6.38411458 15.8697917,6.48958333
  48. 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
  49. 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
  50. C0.130208333,2.48958333 0.201822917,2.38411458 0.29296875,2.29296875 C0.384114583,2.20182292 0.489583333,2.13020833 0.609375,2.078125
  51. 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
  52. 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
  53. 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
  54. 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
  55. 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
  56. </Path.Data>
  57. </Path>
  58. </Viewbox>
  59. </Button.Content>
  60. </Button>
  61. <!--保存文件-->
  62. <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent"
  63. Click="SaveFileBtn_Click">
  64. <Button.Content>
  65. <Viewbox Width="20" Height="20">
  66. <Path Fill="#43474D" >
  67. <Path.Data>
  68. 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
  69. M11,9 L5,9 L5,14 L11,14 L11,9 Z M7,5 L7,6 L4,6 L4,5 L7,5 Z
  70. </Path.Data>
  71. </Path>
  72. </Viewbox>
  73. </Button.Content>
  74. </Button>
  75. <!--工具栏展开收缩-->
  76. <ToggleButton Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ToolExpand_Click">
  77. <ToggleButton.Content>
  78. <Path Fill="#43474D" Width="30" Height="30">
  79. <Path.Data>
  80. 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
  81. </Path.Data>
  82. </Path>
  83. </ToggleButton.Content>
  84. </ToggleButton>
  85. <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
  86. <!--抓手工具-->
  87. <ToggleButton BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" IsChecked="True" IsEnabled="False" Visibility="Collapsed">
  88. <ToggleButton.Content>
  89. <Path Fill="#43474D">
  90. <Path.Data>
  91. M8.7463 7.94055L8.43134 3.20358C8.38986 2.6073 8.82031 2.08322 9.40947 2.01273L9.46546 2.00656C9.75502 1.97416 10.0451 2.06271 10.2681 2.25159C10.4911
  92. 2.44047 10.6276 2.71317 10.6457 3.00614L10.9886 8.17061C10.999 8.31659 11.1097 8.43516 11.2537 8.45444C11.3176 8.46288 11.382 8.44409 11.4315
  93. 8.40258C11.481 8.36108 11.5111 8.30063 11.5145 8.23584L11.7612 3.47595C11.7918 2.85998 12.3116 2.38523 12.923 2.41468H12.9309C13.5429 2.44972
  94. 14.0111 2.97745 13.9773 3.59407L13.7218 8.51438C13.7137 8.66679 13.8235 8.79975 13.9738 8.81936C14.1225 8.83876 14.2625 8.73915 14.2914
  95. 8.59018L14.8006 6.02337C14.9178 5.41517 15.497 5.01851 16.0954 5.13574L16.1041 5.13751C16.7058 5.25854 17.0969 5.84695 16.979 6.45353L16.3684
  96. 9.53687C15.8189 13.3474 15.0586 15.5052 14.3946 16.4246C13.3649 17.8508 11.5573 17.8667 10.1251 17.8667C8.69381 17.8667 7.16012 17.5291 6.44796
  97. 16.9993C5.73492 16.4696 4.77079 15.2575 4.15837 13.9327L4.16712 13.9283C4.11876 13.8639 4.0774 13.7945 4.04376 13.7212L3.105 11.685C2.84552 11.1243
  98. 3.08338 10.4577 3.63781 10.1918L3.64656 10.1874C3.91235 10.0626 4.21656 10.0497 4.49179 10.1517C4.76702 10.2536 4.99055 10.4619 5.11287 10.7304C5.62206
  99. 11.8234 5.94227 12.324 6.07526 12.2324C6.27386 12.0949 6.12075 11.7176 5.85478 9.21249C5.67578 7.53039 5.45319 5.85328 5.18724 4.18289C5.07653 3.5968
  100. 5.44002 3.02581 6.01489 2.88273L6.07526 2.86775C6.35866 2.79957 6.65742 2.85178 6.90147 3.01215C7.14552 3.17252 7.3134 3.42693 7.36572 3.71571L8.168
  101. 8.02341C8.19642 8.17613 8.33897 8.27937 8.49171 8.25787C8.64561 8.23564 8.75656 8.09774 8.7463 7.94143V7.94055Z
  102. </Path.Data>
  103. </Path>
  104. </ToggleButton.Content>
  105. </ToggleButton>
  106. <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
  107. <Grid>
  108. <ComboBox Name="ZoomComboBox" VerticalContentAlignment="Center" Width="72" Height="30" Foreground="#43474D" FontSize="14"
  109. SelectionChanged="ZoomComboBox_SelectionChanged" BorderBrush="#1E000000">
  110. </ComboBox>
  111. <TextBox Name="ZoomTextBox" IsHitTestVisible="False" Width="72" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
  112. IsReadOnly="True" Background="White" Padding="0,0,15,0">100%</TextBox>
  113. <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
  114. <Path.Data>
  115. M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
  116. </Path.Data>
  117. </Path>
  118. </Grid>
  119. <Button Margin="20,0,0,0" Width="30" Height="30" BorderThickness="0" Background="Transparent" Style="{StaticResource LightButtonStyle}" Click="ZoomOutBtn_Click" >
  120. <Button.Content>
  121. <Rectangle Width="12" Height="2" Fill="#0E1114"></Rectangle>
  122. </Button.Content>
  123. </Button>
  124. <Button Margin="10,0,0,0" Width="30" Height="30" BorderThickness="0" Background="Transparent" Style="{StaticResource LightButtonStyle}" Click="ZoomInBtn_Click">
  125. <Button.Content>
  126. <Path Fill="#0E1114">
  127. <Path.Data>
  128. M7.625 6.375V0.75H6.375V6.375H0.75V7.625H6.375V13.25H7.625V7.625H13.25V6.375H7.625Z
  129. </Path.Data>
  130. </Path>
  131. </Button.Content>
  132. </Button>
  133. </StackPanel>
  134. <!--中间工具栏-->
  135. <ComboBox Style="{StaticResource ComboBoxStyle1}" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
  136. <ComboBoxItem IsSelected="True" Tag="Viewer">Viewer</ComboBoxItem>
  137. <ComboBoxItem IsSelected="True" Tag="Annotation">Annotation</ComboBoxItem>
  138. </ComboBox>
  139. <!--右侧工具栏-->
  140. <StackPanel Orientation="Horizontal" Grid.Column="2">
  141. <!--搜索按钮-->
  142. <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="ExpandSearchBtn_Click">
  143. <Button.Content>
  144. <Path Fill="#43474D">
  145. <Path.Data>
  146. 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
  147. 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
  148. 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
  149. 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
  150. 4.19042C11.8709 1.20655 7.03313 1.20655 4.04926 4.19042Z
  151. </Path.Data>
  152. </Path>
  153. </Button.Content>
  154. </Button>
  155. <ToggleButton x:Name="AnnotationBarBtn" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="AnnotationBarControl_Click">
  156. <ToggleButton.Content>
  157. <Path Fill="#43474D" Width="30" Height="30">
  158. <Path.Data>
  159. 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
  160. </Path.Data>
  161. </Path>
  162. </ToggleButton.Content>
  163. </ToggleButton>
  164. <!--页面显示-->
  165. <ToggleButton Name="ViewSettingBtn" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ViewSettingBtn_Click">
  166. <ToggleButton.Content>
  167. <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
  168. <Path.Data>
  169. <CombinedGeometry GeometryCombineMode="Exclude">
  170. <CombinedGeometry.Geometry1>
  171. 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
  172. </CombinedGeometry.Geometry1>
  173. <CombinedGeometry.Geometry2>
  174. <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
  175. </CombinedGeometry.Geometry2>
  176. </CombinedGeometry>
  177. </Path.Data>
  178. </Path>
  179. </ToggleButton.Content>
  180. </ToggleButton>
  181. <!--页面信息-->
  182. <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="PageInfoBtn_Click">
  183. <Button.Content>
  184. <Path Fill="#43474D" VerticalAlignment="Center">
  185. <Path.Data>
  186. 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
  187. 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
  188. 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
  189. 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
  190. 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
  191. 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
  192. </Path.Data>
  193. </Path>
  194. </Button.Content>
  195. </Button>
  196. </StackPanel>
  197. </Grid>
  198. <Grid Name="BodyGrid" Grid.Row="1">
  199. <Grid.ColumnDefinitions>
  200. <ColumnDefinition Width="0"></ColumnDefinition>
  201. <ColumnDefinition Width="0"></ColumnDefinition>
  202. <ColumnDefinition Width="*"></ColumnDefinition>
  203. <ColumnDefinition Width="auto"></ColumnDefinition>
  204. </Grid.ColumnDefinitions>
  205. <Grid.RowDefinitions>
  206. <RowDefinition Height="44"/>
  207. <RowDefinition Height="*"/>
  208. </Grid.RowDefinitions>
  209. <!--工具栏展开-->
  210. <Grid Grid.RowSpan="2" Name="ExpandToolContainer" Visibility="Collapsed">
  211. <Grid.RowDefinitions>
  212. <RowDefinition Height="auto"></RowDefinition>
  213. <RowDefinition Height="*"></RowDefinition>
  214. </Grid.RowDefinitions>
  215. <StackPanel Name="BotaSideTool" Background="{StaticResource color.bg.jumpbar}" Orientation="Horizontal">
  216. <!--缩略图-->
  217. <ToggleButton Name="ThumbToolButton" Height="40" Width="65" BorderThickness="0" Style="{StaticResource ToggleButtonStyle}" Click="ThumbToolButton_Click" >
  218. <ToggleButton.Content>
  219. <Path Width="20" Height="20" Fill="#273C62">
  220. <Path.Data>
  221. M1 0.25H0.25V1V15V15.75H1H4V16.5V18H5.5H16.5H18V16.5V5.5V4H16.5H15.75V1V0.25H15H1ZM14.25 4V1.75H1.75V14.25H4V5.5V4H5.5H14.25ZM5.5 15.75V16.5H16.5V5.5H5.5V14.25V15.75Z </Path.Data>
  222. </Path>
  223. </ToggleButton.Content>
  224. </ToggleButton>
  225. <!--大纲-->
  226. <ToggleButton Name="OutlineToolButton" Height="40" Width="65" BorderThickness="0" Style="{StaticResource ToggleButtonStyle}" Click="OutlineToolButton_Click">
  227. <ToggleButton.Content>
  228. <Path Width="20" Height="20" Fill="#001A4E">
  229. <Path.Data>
  230. M4.5 1.5H1.5V4.5H4.5V1.5ZM4.5 6.5H1.5V9.5H4.5V6.5ZM1.5 11.5H4.5V14.5H1.5V11.5ZM15.5 3.75V2.25H6.5V3.75H15.5ZM15.5 7.25V8.75H6.5V7.25H15.5ZM15.5 13.75V12.25H6.5V13.75H15.5Z
  231. </Path.Data>
  232. </Path>
  233. </ToggleButton.Content>
  234. </ToggleButton>
  235. <!--注释列表--><!--
  236. <ToggleButton Name="AnnotationListButton" Height="40" Width="65" BorderThickness="0" Style="{StaticResource ToggleButtonStyle}" Click="AnnotationListButton_Click">
  237. <ToggleButton.Content>
  238. <Path Width="20" Height="20" Fill="#001A4E">
  239. <Path.Data>
  240. M16 0H1.6L0 14H14.4L16 0ZM8.34885 1.8143L12.0693 11.1154H13.2692V12.1154H10.1923V11.1154H10.9922L10.2384 9.23077H5.53048L4.77689 11.1154H5.57692V12.1154H2.5V11.1154H3.69995L7.42038 1.8143H8.34885ZM7.884 3.345L9.83837 8.23077H5.93035L7.884 3.345Z
  241. </Path.Data>
  242. </Path>
  243. </ToggleButton.Content>
  244. </ToggleButton>-->
  245. <!--书签-->
  246. <ToggleButton Name="BookmarkToolButton" Height="40" Width="65" BorderThickness="0" Style="{StaticResource ToggleButtonStyle}" Click="BookmarkToolButton_Click">
  247. <ToggleButton.Content>
  248. <Path Width="20" Height="20" Stroke="#001A4E">
  249. <Path.Data>
  250. M6.1221 9.85217L1.25 12.6942V0.75H11.75V12.6942L6.8779 9.85217L6.5 9.63172L6.1221 9.85217Z
  251. </Path.Data>
  252. </Path>
  253. </ToggleButton.Content>
  254. </ToggleButton>
  255. <!--文字搜索-->
  256. <ToggleButton Name="SearchToolButton" Height="40" Width="65" BorderThickness="0" Style="{StaticResource ToggleButtonStyle}" Click="SearchToolButton_Click">
  257. <ToggleButton.Content>
  258. <Path Width="20" Height="20" Fill="#001A4E">
  259. <Path.Data>
  260. M4.9284 11.1635C3.06851 9.30364 3.06851 6.28816 4.9284 4.42827C6.78829 2.56838 9.80377 2.56838 11.6637 4.42827C13.5235 6.28816 13.5235 9.30364 11.6637 11.1635C9.80377
  261. 13.0234 6.78829 13.0234 4.9284 11.1635ZM3.86774 3.36761C1.42207 5.81329 1.42207 9.77851 3.86774 12.2242C6.13397 14.4904 9.70494 14.6567 12.1626 12.723L14.3875
  262. 14.9479C14.6804 15.2408 15.1552 15.2408 15.4481 14.9479C15.741 14.655 15.741 14.1801 15.4481 13.8872L13.2233 11.6624C15.1568 9.20466 14.9905 5.63379 12.7243
  263. 3.36761C10.2786 0.921935 6.31342 0.921935 3.86774 3.36761Z
  264. </Path.Data>
  265. </Path>
  266. </ToggleButton.Content>
  267. </ToggleButton>
  268. </StackPanel>
  269. <Border Grid.Row="1" Name="BotaToolContainer">
  270. </Border>
  271. </Grid>
  272. <!--拖动调节控件大小-->
  273. <GridSplitter Grid.RowSpan="2" Name="Splitter" Grid.Column="1" Width="15" ResizeBehavior="PreviousAndNext" Visibility="Collapsed">
  274. <GridSplitter.Template>
  275. <ControlTemplate TargetType="{x:Type GridSplitter}">
  276. <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  277. BorderBrush="{TemplateBinding Border.BorderBrush}"
  278. Background="{TemplateBinding Panel.Background}" >
  279. <Path Fill="Gray" VerticalAlignment="Center">
  280. <Path.Data>
  281. M15 3.75H1V2.25H15V3.75ZM15 8.75H1V7.25H15V8.75ZM1 13.75H15V12.25H1V13.75Z
  282. </Path.Data>
  283. </Path>
  284. </Border>
  285. </ControlTemplate>
  286. </GridSplitter.Template>
  287. </GridSplitter>
  288. <Grid Grid.RowSpan="2" Grid.Column="2" >
  289. <Grid.RowDefinitions>
  290. <RowDefinition Height="auto"/>
  291. <RowDefinition Height="*"/>
  292. </Grid.RowDefinitions>
  293. <cpdftools:CPDFAnnotationBarControl x:Name="AnnotationBarControl" Loaded="AnnotationBarControl_Loaded" Unloaded="AnnotationBarControl_Unloaded" Grid.ColumnSpan="2" Height="44"/>
  294. <Grid Grid.Row="1">
  295. <Grid.ColumnDefinitions>
  296. <ColumnDefinition></ColumnDefinition>
  297. <ColumnDefinition Width="auto"></ColumnDefinition>
  298. </Grid.ColumnDefinitions>
  299. <!--PDFViewer-->
  300. <Border x:Name="PDFGrid" Background="{StaticResource color.bg.mainpage}"></Border>
  301. <!--右侧面板-->
  302. <Border Grid.Column="1" Grid.RowSpan="2" Name="PropertyContainer" Visibility="Collapsed"></Border>
  303. </Grid>
  304. <!--页码工具-->
  305. <Border Grid.Row="1" Name="FloatPageTool" Background="#CC000000" VerticalAlignment="Bottom" HorizontalAlignment="Left"
  306. Margin="590,0,0,20" CornerRadius="5" Width="100" Height="36">
  307. <Grid>
  308. <Grid.ColumnDefinitions>
  309. <ColumnDefinition Width="auto"></ColumnDefinition>
  310. <ColumnDefinition Width="*"></ColumnDefinition>
  311. <ColumnDefinition Width="auto"></ColumnDefinition>
  312. </Grid.ColumnDefinitions>
  313. <!--上一页-->
  314. <Border Background="Transparent" Width="20" Height="20" Margin="11,0,0,0" MouseLeftButtonDown="PrevPageBorder_MouseLeftButtonDown">
  315. <Path Fill="White" VerticalAlignment="Center" HorizontalAlignment="Center">
  316. <Path.Data>
  317. M7.70711 13.7071C8.06759 13.3466 8.09532 12.7794 7.7903 12.3871L7.70711 12.2929L2.415 7L7.70711 1.70711C8.06759 1.34662
  318. 8.09532 0.779392 7.7903 0.387101L7.70711 0.292894C7.34662 -0.0675898 6.77939 -0.0953197 6.3871 0.209705L6.29289
  319. 0.292894L0.292892 6.29289C-0.0675917 6.65338 -0.0953217 7.22061 0.209703 7.6129L0.292892 7.70711L6.29289
  320. 13.7071C6.68342 14.0976 7.31658 14.0976 7.70711 13.7071Z
  321. </Path.Data>
  322. </Path>
  323. </Border>
  324. <!--页码范围-->
  325. <TextBlock Name="PageRangeText" Grid.Column="1" Foreground="White" FontSize="12" VerticalAlignment="Center" HorizontalAlignment="Center">2/3</TextBlock>
  326. <!--下一页-->
  327. <Border Width="20" Height="20" Background="Transparent" Grid.Column="2" Margin="0,0,11,0" MouseLeftButtonDown="NextPageBorder_MouseLeftButtonDown">
  328. <Path Fill="White" VerticalAlignment="Center" HorizontalAlignment="Center">
  329. <Path.Data>
  330. M0.292893 0.292893C-0.0675908 0.653377 -0.0953203 1.22061 0.209705 1.6129L0.292893 1.70711L5.585 7L0.292893
  331. 12.2929C-0.0675908 12.6534 -0.0953203 13.2206 0.209705 13.6129L0.292893 13.7071C0.653377 14.0676 1.22061 14.0953
  332. 1.6129 13.7903L1.70711 13.7071L7.70711 7.70711C8.06759 7.34662 8.09532 6.77939 7.7903 6.3871L7.70711 6.29289L1.70711
  333. 0.292893C1.31658 -0.0976311 0.683418 -0.0976311 0.292893 0.292893Z
  334. </Path.Data>
  335. </Path>
  336. </Border>
  337. </Grid>
  338. </Border>
  339. </Grid>
  340. </Grid>
  341. </Grid>
  342. <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed">
  343. <Grid>
  344. <!--文件信息-->
  345. <Grid Name="FileInfoUI" Width="422" Height="680" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White" Visibility="Collapsed">
  346. <Grid.ColumnDefinitions>
  347. <ColumnDefinition Width="*"></ColumnDefinition>
  348. <ColumnDefinition Width="*"></ColumnDefinition>
  349. </Grid.ColumnDefinitions>
  350. <Grid.RowDefinitions>
  351. <RowDefinition Height="auto"></RowDefinition>
  352. <RowDefinition Height="*"></RowDefinition>
  353. </Grid.RowDefinitions>
  354. <TextBlock Width="50" Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">FileInfo:</TextBlock>
  355. <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0" Click="FileInfoCloseBtn_Click">
  356. <Button.Content>
  357. <Path Fill="Black">
  358. <Path.Data>
  359. 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
  360. </Path.Data>
  361. </Path>
  362. </Button.Content>
  363. </Button>
  364. <cpdftools:CPDFInfoControl Grid.Row="1" Margin="25,10,25,0" Grid.ColumnSpan="2" Name="FileInfoControl"></cpdftools:CPDFInfoControl>
  365. </Grid>
  366. <!--密码验证-->
  367. <local:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"></local:PasswordDialog>
  368. </Grid>
  369. </Border>
  370. </Grid>
  371. </Window>