MainWindow.xaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <Window x:Class="DocsEditor.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:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
  7. xmlns:local="clr-namespace:DocsEditor"
  8. xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common;assembly=Compdfkit_Tools"
  9. mc:Ignorable="d"
  10. Title="Docs Editor_ComPDFKit" Height="450" Width="800">
  11. <Window.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. </Window.Resources>
  20. <Grid>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="40"></RowDefinition>
  24. <RowDefinition Height="*"></RowDefinition>
  25. </Grid.RowDefinitions>
  26. <Grid>
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="auto"></ColumnDefinition>
  29. <ColumnDefinition Width="*"></ColumnDefinition>
  30. <ColumnDefinition Width="auto"></ColumnDefinition>
  31. </Grid.ColumnDefinitions>
  32. <Border Height="1" Background="LightGray" VerticalAlignment="Bottom" Grid.ColumnSpan="3"/>
  33. <Grid>
  34. <StackPanel Orientation="Horizontal" Margin="20,0,0,0">
  35. <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="OpenFile_Click">
  36. <Button.Content>
  37. <Viewbox Width="20" Height="20">
  38. <Path Fill="#43474D" >
  39. <Path.Data>
  40. M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792
  41. 4.67578125,2.18489583 4.80859375,2.2578125 C4.94140625,2.33072917 5.05989583,2.41145833 5.1640625,2.5 C5.26822917,2.58854167
  42. 5.37369792,2.66927083 5.48046875,2.7421875 C5.58723958,2.81510417 5.70182292,2.87630208 5.82421875,2.92578125 C5.94661458,2.97526042
  43. 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
  44. C12.5104167,3.13020833 12.6158854,3.20182292 12.7070312,3.29296875 C12.7981771,3.38411458 12.8697917,3.48958333 12.921875,3.609375
  45. 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
  46. 15.3867188,6.078125 C15.5091146,6.13020833 15.6158854,6.20182292 15.7070312,6.29296875 C15.7981771,6.38411458 15.8697917,6.48958333
  47. 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
  48. 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
  49. C0.130208333,2.48958333 0.201822917,2.38411458 0.29296875,2.29296875 C0.384114583,2.20182292 0.489583333,2.13020833 0.609375,2.078125
  50. 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. </Path.Data>
  56. </Path>
  57. </Viewbox>
  58. </Button.Content>
  59. <Button.ToolTip>
  60. <ToolTip Content="Open..."></ToolTip>
  61. </Button.ToolTip>
  62. </Button>
  63. <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent"
  64. Click="SaveFileBtn_Click" IsEnabled="{Binding CanSave,Mode=OneWay}">
  65. <Button.Content>
  66. <Viewbox Width="20" Height="20">
  67. <Path IsEnabled="{Binding CanSave,Mode=OneWay}">
  68. <Path.Style>
  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.Style>
  80. <Path.Data>
  81. 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
  82. M11,9 L5,9 L5,14 L11,14 L11,9 Z M7,5 L7,6 L4,6 L4,5 L7,5 Z
  83. </Path.Data>
  84. </Path>
  85. </Viewbox>
  86. </Button.Content>
  87. <Button.ToolTip>
  88. <ToolTip Content="Save"></ToolTip>
  89. </Button.ToolTip>
  90. </Button>
  91. <ToggleButton Name="LeftToolPanelButton" Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="LeftToolPanelButton_Click">
  92. <ToggleButton.Content>
  93. <Path Fill="#43474D" Width="30" Height="30">
  94. <Path.Data>
  95. 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
  96. </Path.Data>
  97. </Path>
  98. </ToggleButton.Content>
  99. <ToggleButton.ToolTip>
  100. <ToolTip Content="Panel"></ToolTip>
  101. </ToggleButton.ToolTip>
  102. </ToggleButton>
  103. <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
  104. <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"></cpdftools:CPDFScalingControl>
  105. </StackPanel>
  106. </Grid>
  107. <ComboBox Name="ViewComboBox" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E"
  108. Style="{StaticResource ComboBoxStyle1}" SelectionChanged="ViewComboBox_SelectionChanged">
  109. <ComboBoxItem>Viewer</ComboBoxItem>
  110. <ComboBoxItem IsSelected="True">Page Edit</ComboBoxItem>
  111. </ComboBox>
  112. <StackPanel Orientation="Horizontal" Grid.Column="2">
  113. <Button x:Name="SearchButton" BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Focusable="False" Click="ExpandSearchBtn_Click">
  114. <Button.Content>
  115. <Path Fill="#43474D">
  116. <Path.Data>
  117. 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
  118. 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
  119. 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
  120. 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
  121. 4.19042C11.8709 1.20655 7.03313 1.20655 4.04926 4.19042Z
  122. </Path.Data>
  123. </Path>
  124. </Button.Content>
  125. <Button.ToolTip>
  126. <ToolTip Content="Search"></ToolTip>
  127. </Button.ToolTip>
  128. </Button>
  129. <ToggleButton BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Visibility="Collapsed">
  130. <ToggleButton.Content>
  131. <Path Fill="#43474D" Width="30" Height="30">
  132. <Path.Data>
  133. 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
  134. </Path.Data>
  135. </Path>
  136. </ToggleButton.Content>
  137. </ToggleButton>
  138. <ToggleButton x:Name="RightToolPanelButton" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="RightToolPanelButton_Click">
  139. <ToggleButton.Content>
  140. <Path Fill="#43474D" Width="30" Height="30">
  141. <Path.Data>
  142. 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
  143. </Path.Data>
  144. </Path>
  145. </ToggleButton.Content>
  146. <ToggleButton.ToolTip>
  147. <ToolTip Content="Properties"></ToolTip>
  148. </ToggleButton.ToolTip>
  149. </ToggleButton>
  150. <ToggleButton Name="ViewSettingBtn" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ViewSettingBtn_Click">
  151. <ToggleButton.Content>
  152. <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
  153. <Path.Data>
  154. <CombinedGeometry GeometryCombineMode="Exclude">
  155. <CombinedGeometry.Geometry1>
  156. 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
  157. </CombinedGeometry.Geometry1>
  158. <CombinedGeometry.Geometry2>
  159. <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
  160. </CombinedGeometry.Geometry2>
  161. </CombinedGeometry>
  162. </Path.Data>
  163. </Path>
  164. </ToggleButton.Content>
  165. <ToggleButton.ToolTip>
  166. <ToolTip Content="Page Display"></ToolTip>
  167. </ToggleButton.ToolTip>
  168. </ToggleButton>
  169. <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="PageInfoBtn_Click">
  170. <Button.Content>
  171. <Path Fill="#43474D" VerticalAlignment="Center">
  172. <Path.Data>
  173. 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
  174. 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
  175. 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
  176. 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
  177. 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
  178. 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
  179. </Path.Data>
  180. </Path>
  181. </Button.Content>
  182. <Button.ToolTip>
  183. <ToolTip Content="Document Info"></ToolTip>
  184. </Button.ToolTip>
  185. </Button>
  186. </StackPanel>
  187. </Grid>
  188. <Grid Name="BodyGrid" Grid.Row="1">
  189. <Grid.ColumnDefinitions>
  190. <ColumnDefinition Width="0"></ColumnDefinition>
  191. <ColumnDefinition Width="0"></ColumnDefinition>
  192. <ColumnDefinition Width="*"></ColumnDefinition>
  193. <ColumnDefinition Width="auto"></ColumnDefinition>
  194. </Grid.ColumnDefinitions>
  195. <Grid.RowDefinitions>
  196. <RowDefinition Height="auto"/>
  197. <RowDefinition Height="*"/>
  198. </Grid.RowDefinitions>
  199. <cpdftools:CPDFBOTABarControl Grid.Row="1" Visibility="Collapsed" Name="BotaSideTool"/>
  200. <GridSplitter Name="Splitter" Grid.Row="1" Grid.Column="1" Width="15" ResizeBehavior="PreviousAndNext" Visibility="Collapsed">
  201. <GridSplitter.Template>
  202. <ControlTemplate TargetType="{x:Type GridSplitter}">
  203. <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  204. BorderBrush="{TemplateBinding Border.BorderBrush}"
  205. Background="{TemplateBinding Panel.Background}" >
  206. <Path Fill="Gray" VerticalAlignment="Center">
  207. <Path.Data>
  208. M15 3.75H1V2.25H15V3.75ZM15 8.75H1V7.25H15V8.75ZM1 13.75H15V12.25H1V13.75Z
  209. </Path.Data>
  210. </Path>
  211. </Border>
  212. </ControlTemplate>
  213. </GridSplitter.Template>
  214. </GridSplitter>
  215. <Grid Grid.Column="2" Grid.Row="1" >
  216. <Grid.RowDefinitions>
  217. <RowDefinition Height="auto"></RowDefinition>
  218. <RowDefinition Height="*"></RowDefinition>
  219. </Grid.RowDefinitions>
  220. <Border Grid.Row="1" x:Name="PDFGrid" Background="#CECECE" Grid.ColumnSpan="2"></Border>
  221. <Border x:Name="ToolBarContainer" Height="45" Visibility="Collapsed" BorderThickness="1" BorderBrush="#1A000000" Background="#F2F3F5" Grid.ColumnSpan="2">
  222. <cpdftools:CPDFPageEditBarControl x:Name="CPDFPageEditBarControl" Grid.ColumnSpan="4" Height="44"/>
  223. </Border>
  224. <cpdfcommon:PageNumberControl Grid.Row="1" Name="FloatPageTool" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,20" Grid.Column="1"></cpdfcommon:PageNumberControl>
  225. <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed" Grid.Row="1">
  226. <Grid>
  227. <Grid Name="FileInfoUI" Width="422" Height="680" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White" Visibility="Collapsed">
  228. <Grid.ColumnDefinitions>
  229. <ColumnDefinition Width="*"></ColumnDefinition>
  230. <ColumnDefinition Width="*"></ColumnDefinition>
  231. </Grid.ColumnDefinitions>
  232. <Grid.RowDefinitions>
  233. <RowDefinition Height="auto"></RowDefinition>
  234. <RowDefinition Height="*"></RowDefinition>
  235. </Grid.RowDefinitions>
  236. <TextBlock Width="50" Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">FileInfo:</TextBlock>
  237. <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0" Click="FileInfoCloseBtn_Click">
  238. <Button.Content>
  239. <Path Fill="Black">
  240. <Path.Data>
  241. 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
  242. </Path.Data>
  243. </Path>
  244. </Button.Content>
  245. </Button>
  246. <cpdftools:CPDFInfoControl Grid.Row="1" Margin="25,10,25,0" Grid.ColumnSpan="2" Name="FileInfoControl"></cpdftools:CPDFInfoControl>
  247. </Grid>
  248. <cpdfcommon:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"/>
  249. </Grid>
  250. </Border>
  251. </Grid>
  252. <Border Grid.Row="1" Name="PropertyContainer" Grid.Column="3" Visibility="Hidden"></Border>
  253. </Grid>
  254. </Grid>
  255. </Grid>
  256. </Window>