ToolsBarContent.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <UserControl
  2. x:Class="PDF_Office.Views.Tools.ToolsBarContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:prism="http://prismlibrary.com/"
  7. xmlns:tools="clr-namespace:PDF_Office.ViewModels.Tools"
  8. prism:ViewModelLocator.AutoWireViewModel="True">
  9. <UserControl.Resources>
  10. <ResourceDictionary>
  11. <ResourceDictionary.MergedDictionaries>
  12. <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml" />
  13. <ResourceDictionary Source="../../Styles/MenuStyle.xaml" />
  14. </ResourceDictionary.MergedDictionaries>
  15. </ResourceDictionary>
  16. </UserControl.Resources>
  17. <Grid>
  18. <Border
  19. x:Name="ToolsBorder"
  20. Height="40"
  21. BorderBrush="#1A000000"
  22. BorderThickness="0,1,0,1">
  23. <WrapPanel Height="40" HorizontalAlignment="Center">
  24. <Button Command="{Binding CompressCommand}" Style="{StaticResource InsideBarBtnStyle}">
  25. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  26. <StackPanel Margin="0,0,8,0">
  27. <Border
  28. Width="30"
  29. Height="30"
  30. Background="LightSeaGreen" />
  31. </StackPanel>
  32. <TextBlock VerticalAlignment="Center" Text="压缩" />
  33. </StackPanel>
  34. </Button>
  35. <Button Command="{Binding MergeCommand}" Style="{StaticResource InsideBarBtnStyle}">
  36. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  37. <StackPanel Margin="0,0,8,0">
  38. <Border
  39. Width="30"
  40. Height="30"
  41. Background="LightSeaGreen" />
  42. </StackPanel>
  43. <TextBlock VerticalAlignment="Center" Text="合并" />
  44. </StackPanel>
  45. </Button>
  46. <Button Style="{StaticResource InsideBarBtnStyle}" Visibility="Collapsed">
  47. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  48. <StackPanel Margin="0,0,8,0">
  49. <Border
  50. Width="30"
  51. Height="30"
  52. Background="LightSeaGreen" />
  53. </StackPanel>
  54. <TextBlock VerticalAlignment="Center" Text="文件对比" />
  55. </StackPanel>
  56. </Button>
  57. <Menu Background="Transparent">
  58. <MenuItem
  59. x:Name="btnPassword"
  60. Width="auto"
  61. Height="40"
  62. Padding="0"
  63. BorderThickness="0">
  64. <MenuItem.Header>
  65. <StackPanel
  66. Margin="12,0,12,0"
  67. VerticalAlignment="Center"
  68. Orientation="Horizontal">
  69. <StackPanel Margin="0,0,8,0" VerticalAlignment="Center">
  70. <Border
  71. Width="30"
  72. Height="30"
  73. Background="LightSeaGreen" />
  74. </StackPanel>
  75. <TextBlock
  76. x:Name="txtPassword"
  77. Height="40"
  78. Padding="0,12,0,0"
  79. FontSize="12"
  80. Text="安全" />
  81. <Path
  82. HorizontalAlignment="Right"
  83. VerticalAlignment="Center"
  84. Data="M0 0L4 4L8 0H0Z"
  85. Fill="Black">
  86. <Path.RenderTransform>
  87. <TranslateTransform X="8" />
  88. </Path.RenderTransform>
  89. </Path>
  90. </StackPanel>
  91. </MenuItem.Header>
  92. <MenuItem
  93. Name="MenuEncrypt"
  94. Command="{Binding SetPasswordCommand}"
  95. Style="{StaticResource ToolsMenuStyle}">
  96. <MenuItem.Header>
  97. <TextBlock Text="设置密码" />
  98. </MenuItem.Header>
  99. </MenuItem>
  100. <MenuItem
  101. Name="MenuDecrypt"
  102. Command="{Binding CancelPasswordCommand}"
  103. Style="{StaticResource ToolsMenuStyle}">
  104. <MenuItem.Header>
  105. <TextBlock Text="解除安全性设置" />
  106. </MenuItem.Header>
  107. </MenuItem>
  108. </MenuItem>
  109. </Menu>
  110. <Button
  111. Name="RedactionContent"
  112. Command="{Binding SetEditToolsCommand}"
  113. CommandParameter="{Binding ElementName=RedactionContent}"
  114. Style="{StaticResource InsideBarBtnStyle}">
  115. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  116. <StackPanel Margin="0,0,8,0">
  117. <Border
  118. Width="30"
  119. Height="30"
  120. Background="LightSeaGreen" />
  121. </StackPanel>
  122. <TextBlock VerticalAlignment="Center" Text="密文" />
  123. <Path
  124. HorizontalAlignment="Right"
  125. VerticalAlignment="Center"
  126. Data="M0 0L4 4L8 0H0Z"
  127. Fill="Black">
  128. <Path.RenderTransform>
  129. <TranslateTransform X="8" />
  130. </Path.RenderTransform>
  131. </Path>
  132. </StackPanel>
  133. </Button>
  134. <Button
  135. x:Name="WatermarkContent"
  136. Command="{Binding SetEditToolsCommand}"
  137. CommandParameter="{Binding ElementName=WatermarkContent}"
  138. Style="{StaticResource InsideBarBtnStyle}">
  139. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  140. <StackPanel Margin="0,0,8,0">
  141. <Border
  142. Width="30"
  143. Height="30"
  144. Background="LightSeaGreen" />
  145. </StackPanel>
  146. <TextBlock VerticalAlignment="Center" Text="水印" />
  147. <Path
  148. HorizontalAlignment="Right"
  149. VerticalAlignment="Center"
  150. Data="M0 0L4 4L8 0H0Z"
  151. Fill="Black">
  152. <Path.RenderTransform>
  153. <TranslateTransform X="8" />
  154. </Path.RenderTransform>
  155. </Path>
  156. </StackPanel>
  157. </Button>
  158. <Button
  159. Name="BackgroundContent"
  160. Command="{Binding SetEditToolsCommand}"
  161. CommandParameter="{Binding ElementName=BackgroundContent}"
  162. Style="{StaticResource InsideBarBtnStyle}">
  163. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  164. <StackPanel Margin="0,0,8,0">
  165. <Border
  166. Width="30"
  167. Height="30"
  168. Background="LightSeaGreen" />
  169. </StackPanel>
  170. <TextBlock VerticalAlignment="Center" Text="背景" />
  171. <Path
  172. HorizontalAlignment="Right"
  173. VerticalAlignment="Center"
  174. Data="M0 0L4 4L8 0H0Z"
  175. Fill="Black">
  176. <Path.RenderTransform>
  177. <TranslateTransform X="8" />
  178. </Path.RenderTransform>
  179. </Path>
  180. </StackPanel>
  181. </Button>
  182. <Button
  183. Name="HeaderFooterContent"
  184. Command="{Binding SetEditToolsCommand}"
  185. CommandParameter="{Binding ElementName=HeaderFooterContent}"
  186. Style="{StaticResource InsideBarBtnStyle}">
  187. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  188. <StackPanel Margin="0,0,8,0">
  189. <Border
  190. Width="30"
  191. Height="30"
  192. Background="LightSeaGreen" />
  193. </StackPanel>
  194. <TextBlock VerticalAlignment="Center" Text="页眉页脚" />
  195. <Path
  196. HorizontalAlignment="Right"
  197. VerticalAlignment="Center"
  198. Data="M0 0L4 4L8 0H0Z"
  199. Fill="Black">
  200. <Path.RenderTransform>
  201. <TranslateTransform X="8" />
  202. </Path.RenderTransform>
  203. </Path>
  204. </StackPanel>
  205. </Button>
  206. <Button
  207. Name="BatesContent"
  208. Command="{Binding SetEditToolsCommand}"
  209. CommandParameter="{Binding ElementName=BatesContent}"
  210. Style="{StaticResource InsideBarBtnStyle}">
  211. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  212. <StackPanel Margin="0,0,8,0">
  213. <Border
  214. Width="30"
  215. Height="30"
  216. Background="LightSeaGreen" />
  217. </StackPanel>
  218. <TextBlock VerticalAlignment="Center" Text="贝茨码" />
  219. <Path
  220. HorizontalAlignment="Right"
  221. VerticalAlignment="Center"
  222. Data="M0 0L4 4L8 0H0Z"
  223. Fill="Black">
  224. <Path.RenderTransform>
  225. <TranslateTransform X="8" />
  226. </Path.RenderTransform>
  227. </Path>
  228. </StackPanel>
  229. </Button>
  230. <Button Style="{StaticResource InsideBarBtnStyle}" Visibility="Collapsed">
  231. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  232. <StackPanel Margin="0,0,8,0">
  233. <Border
  234. Width="30"
  235. Height="30"
  236. Background="LightSeaGreen" />
  237. </StackPanel>
  238. <TextBlock VerticalAlignment="Center" Text="裁剪" />
  239. </StackPanel>
  240. </Button>
  241. </WrapPanel>
  242. </Border>
  243. </Grid>
  244. </UserControl>