ContextMenuStyle.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mainpage="clr-namespace:PDF_Office.Strings.MainPage">
  5. <!-- 快捷工具展开收缩 -->
  6. <ContextMenu x:Key="ExpendToolsContextMenu" FontSize="14">
  7. <MenuItem
  8. Name="ExpendMenuItem"
  9. Width="92"
  10. Header="展开"
  11. IsEnabled="True" />
  12. </ContextMenu>
  13. <ContextMenu x:Key="CustomFontStyleFlyoutMenu" FontSize="14">
  14. <MenuItem
  15. Name="ChangeStyleMenuItem"
  16. Header="用所选部分重新定义"
  17. IsEnabled="True" />
  18. <MenuItem
  19. Name="BackStyleMenuItem"
  20. Header="恢复默认预设样式"
  21. IsEnabled="True" />
  22. </ContextMenu>
  23. <!-- 便签ToolTip -->
  24. <Style x:Key="FlowToolTip" TargetType="ToolTip">
  25. <Setter Property="HorizontalAlignment" Value="Left" />
  26. <Setter Property="VerticalAlignment" Value="Top" />
  27. <Setter Property="Template">
  28. <Setter.Value>
  29. <ControlTemplate>
  30. <Grid>
  31. <Border
  32. Background="{StaticResource color.sys.layout.dark.bg}"
  33. BorderBrush="{StaticResource color.sys.layout.dark.bg}"
  34. BorderThickness="4"
  35. CornerRadius="4">
  36. <Border.Effect>
  37. <DropShadowEffect
  38. BlurRadius="7"
  39. Direction="0"
  40. Opacity="0.09"
  41. ShadowDepth="0"
  42. Color="Black" />
  43. </Border.Effect>
  44. </Border>
  45. <TextBlock
  46. Margin="16,8,16,8"
  47. FontSize="13"
  48. Foreground="{StaticResource color.sys.text.anti.norm}"
  49. Text="{TemplateBinding ContentControl.Content}"
  50. TextWrapping="Wrap" />
  51. </Grid>
  52. </ControlTemplate>
  53. </Setter.Value>
  54. </Setter>
  55. </Style>
  56. <!-- 注释 - 高亮、下划线、删除线 -右键菜单 -->
  57. <Style x:Key="UIElementMenuItem" TargetType="MenuItem">
  58. <Setter Property="Template">
  59. <Setter.Value>
  60. <ControlTemplate TargetType="MenuItem">
  61. <Grid
  62. Width="{TemplateBinding Width}"
  63. Height="24"
  64. Background="#FBFBFD">
  65. <ContentPresenter Content="{TemplateBinding Header}" />
  66. </Grid>
  67. </ControlTemplate>
  68. </Setter.Value>
  69. </Setter>
  70. </Style>
  71. <!-- 注释-内容选择-右键菜单 -->
  72. <ContextMenu
  73. x:Key="SnapshotContextMenu"
  74. Background="{StaticResource color.sys.layout.mg}"
  75. FontSize="14">
  76. <MenuItem
  77. Name="BtnSnapCopy"
  78. Header="{x:Static mainpage:MainPage.ContentSelection_Copy}"
  79. IsEnabled="True" InputGestureText="Ctrl+C">
  80. <!--<MenuItem.Icon>
  81. <Path Data="M5.24031 1.5H0.5V14.5H15.5V4H7.24031L5.24031 1.5ZM1.5 13.5V2.5H4.75969L6.75969 5H14.5V13.5H1.5ZM4 7.5H12V6.5H4V7.5Z" Fill="Black">
  82. <Path.RenderTransform>
  83. <TranslateTransform X="3.0000" Y="0" />
  84. </Path.RenderTransform>
  85. </Path>
  86. </MenuItem.Icon>-->
  87. </MenuItem>
  88. <MenuItem
  89. Name="BtnSnapExport"
  90. Header="{x:Static mainpage:MainPage.ContentSelection_Output}"
  91. IsEnabled="True">
  92. <!--<MenuItem.Icon>
  93. <Path Data="M5.24031 1.5H0.5V14.5H15.5V4H7.24031L5.24031 1.5ZM1.5 13.5V2.5H4.75969L6.75969 5H14.5V13.5H1.5ZM4 7.5H12V6.5H4V7.5Z" Fill="Black">
  94. <Path.RenderTransform>
  95. <TranslateTransform X="3.0000" Y="0" />
  96. </Path.RenderTransform>
  97. </Path>
  98. </MenuItem.Icon>-->
  99. <MenuItem Name="MenuExportPNG" Header="PNG" />
  100. <MenuItem Name="MenuExportJPG" Header="JPG" />
  101. <MenuItem Name="MenuExportPDF" Header="PDF" />
  102. </MenuItem>
  103. <MenuItem
  104. Name="BtnSnapCropping"
  105. Header="{x:Static mainpage:MainPage.ContentSelection_Crop}"
  106. IsEnabled="True">
  107. <!--<MenuItem.Icon>
  108. <Path Data="M5.24031 1.5H0.5V14.5H15.5V4H7.24031L5.24031 1.5ZM1.5 13.5V2.5H4.75969L6.75969 5H14.5V13.5H1.5ZM4 7.5H12V6.5H4V7.5Z" Fill="Black">
  109. <Path.RenderTransform>
  110. <TranslateTransform X="3.0000" Y="0" />
  111. </Path.RenderTransform>
  112. </Path>
  113. </MenuItem.Icon>-->
  114. </MenuItem>
  115. <MenuItem
  116. Name="BtnSnapZoom"
  117. Header="{x:Static mainpage:MainPage.ContentSelection_ZoomArea}"
  118. IsEnabled="True">
  119. <!--<MenuItem.Icon>
  120. <Path Data="M5.24031 1.5H0.5V14.5H15.5V4H7.24031L5.24031 1.5ZM1.5 13.5V2.5H4.75969L6.75969 5H14.5V13.5H1.5ZM4 7.5H12V6.5H4V7.5Z" Fill="Black">
  121. <Path.RenderTransform>
  122. <TranslateTransform X="3.0000" Y="0" />
  123. </Path.RenderTransform>
  124. </Path>
  125. </MenuItem.Icon>-->
  126. </MenuItem>
  127. <MenuItem
  128. Name="BtnSnapPrint"
  129. Header="{x:Static mainpage:MainPage.ContentSelection_Print}"
  130. IsEnabled="True" InputGestureText="Ctrl+P">
  131. <!--<MenuItem.Icon>
  132. <Path Data="M5.24031 1.5H0.5V14.5H15.5V4H7.24031L5.24031 1.5ZM1.5 13.5V2.5H4.75969L6.75969 5H14.5V13.5H1.5ZM4 7.5H12V6.5H4V7.5Z" Fill="Black">
  133. <Path.RenderTransform>
  134. <TranslateTransform X="3.0000" Y="0" />
  135. </Path.RenderTransform>
  136. </Path>
  137. </MenuItem.Icon>-->
  138. </MenuItem>
  139. </ContextMenu>
  140. <ContextMenu x:Key="RedactionContextMenu">
  141. <MenuItem Name="MenuDelete" Header="Delete" />
  142. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  143. <MenuItem Name="MenuProperties" Header="Properties..." />
  144. <MenuItem Name="MenuSetDeufalt" Header="Use Current Properties as New Default" />
  145. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  146. <MenuItem Name="MenuRepeat" Header="Repeat mark across pages" />
  147. <MenuItem Name="MenuApply" Header="Apply Redactions" />
  148. <MenuItem Name="MenuErase" Header="Erase Redactions" />
  149. </ContextMenu>
  150. <Separator
  151. x:Key="Separator"
  152. Height="1"
  153. BorderBrush="#33000000"
  154. BorderThickness="1"
  155. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  156. <!-- 阅读页点击空白处菜单 -->
  157. <ContextMenu x:Key="ViewerContextMenu" FontSize="14">
  158. <MenuItem
  159. Header="{x:Static mainpage:MainPage.ViewRightMenu_Paste}"
  160. InputGestureText="Ctrl+V"
  161. Tag="Paste" />
  162. <Separator
  163. Height="1"
  164. BorderBrush="#33000000"
  165. BorderThickness="1"
  166. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  167. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_AddComment}" Tag="AddAnnotation">
  168. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Freehand}" Tag="AnnotFreehand" />
  169. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Text}" Tag="AnnotFreeText" />
  170. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Note}" Tag="AnnotSticky" />
  171. <Separator
  172. Height="1"
  173. BorderBrush="#33000000"
  174. BorderThickness="1"
  175. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  176. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Rectangle}" Tag="AnnotSquare" />
  177. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Oval}" Tag="AnnotCircle" />
  178. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Arrow}" Tag="AnnotArrow" />
  179. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_StraightLine}" Tag="AnnotLine" />
  180. <Separator
  181. Height="1"
  182. BorderBrush="#33000000"
  183. BorderThickness="1"
  184. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  185. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Link}" Tag="AnnotLink" />
  186. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Stamp}" Tag="AnnotStamp" />
  187. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Signature}" Tag="AnnotAutograph" />
  188. </MenuItem>
  189. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_HideAnnotations}" Tag="HiddenAnnot" />
  190. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_ShowAnnotations}" Tag="DisplayAnnot" />
  191. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_AddBookmarks}" Tag="AddBookMark" />
  192. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_RemoveBookmarks}" Tag="DelBookMark" />
  193. <Separator
  194. Height="1"
  195. BorderBrush="#33000000"
  196. BorderThickness="1"
  197. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  198. <MenuItem Header="工具模式" Tag="ToolMode">
  199. <MenuItem
  200. Header="默认工具"
  201. IsCheckable="True"
  202. Tag="default" />
  203. <MenuItem
  204. Header="{x:Static mainpage:MainPage.ViewRightMenu_ScrollTool}"
  205. IsCheckable="True"
  206. Tag="roll" />
  207. <MenuItem
  208. Header="放大镜"
  209. IsCheckable="True"
  210. Tag="magnifier"
  211. Visibility="Collapsed" />
  212. <MenuItem
  213. Header="{x:Static mainpage:MainPage.ViewRightMenu_ContentSelection}"
  214. IsCheckable="True"
  215. Tag="content" />
  216. <MenuItem
  217. Header="{x:Static mainpage:MainPage.ViewRightMenu_AreaZoom}"
  218. IsCheckable="True"
  219. Tag="zoom"
  220. Visibility="Collapsed" />
  221. </MenuItem>
  222. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_OnReadMode}" Tag="ReadModel" />
  223. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_OutReadMode}" Tag="UnReadModel" />
  224. <Separator
  225. Height="1"
  226. BorderBrush="#33000000"
  227. BorderThickness="1"
  228. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  229. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Zoom}" Tag="ViewZoom">
  230. <MenuItem
  231. Header="{x:Static mainpage:MainPage.ViewRightMenu_FitWidth}"
  232. IsCheckable="True"
  233. Tag="FitWidth" />
  234. <MenuItem
  235. Header="{x:Static mainpage:MainPage.ViewRightMenu_FitPage}"
  236. IsCheckable="True"
  237. Tag="FitHeight" />
  238. <MenuItem
  239. Header="{x:Static mainpage:MainPage.ViewRightMenu_ActualSize}"
  240. IsCheckable="True"
  241. Tag="FitSize" />
  242. <MenuItem
  243. Header="{x:Static mainpage:MainPage.ViewRightMenu_ZoomIn}"
  244. IsCheckable="True"
  245. Tag="enlarge" />
  246. <MenuItem
  247. Header="{x:Static mainpage:MainPage.ViewRightMenu_ZoomOut}"
  248. IsCheckable="True"
  249. Tag="narrow" />
  250. </MenuItem>
  251. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_PageDisplay}" Tag="PageDisplay">
  252. <MenuItem
  253. Header="{x:Static mainpage:MainPage.ViewRightMenu_SinglePage}"
  254. IsCheckable="True"
  255. Tag="SingleView" />
  256. <MenuItem
  257. Header="{x:Static mainpage:MainPage.ViewRightMenu_SinglePageContinuous}"
  258. IsCheckable="True"
  259. Tag="SingleContinueView" />
  260. <MenuItem
  261. Header="{x:Static mainpage:MainPage.ViewRightMenu_TwoPages}"
  262. IsCheckable="True"
  263. Tag="DoubleView" />
  264. <MenuItem
  265. Header="{x:Static mainpage:MainPage.ViewRightMenu_TwoPagesContinuous}"
  266. IsCheckable="True"
  267. Tag="DoubleContinueView" />
  268. <MenuItem
  269. Header="{x:Static mainpage:MainPage.ViewRightMenu_BookMode}"
  270. IsCheckable="True"
  271. Tag="BookMode" />
  272. </MenuItem>
  273. <MenuItem
  274. Header="高亮显示超链接"
  275. IsCheckable="True"
  276. Tag="HighlightLinks" />
  277. <Separator
  278. Height="1"
  279. BorderBrush="#33000000"
  280. BorderThickness="1"
  281. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  282. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Search}" InputGestureText="Ctrl+F" Tag="Select" />
  283. <MenuItem Header="{x:Static mainpage:MainPage.ViewRightMenu_Print}" InputGestureText="Ctrl+P" Tag="Print" />
  284. <ContextMenu.InputBindings>
  285. <KeyBinding
  286. Key="P"
  287. Command="{Binding PrintCommand}"
  288. Modifiers="Ctrl" />
  289. <KeyBinding
  290. Key="F"
  291. Command="{Binding SelectCommand}"
  292. Modifiers="Ctrl" />
  293. </ContextMenu.InputBindings>
  294. </ContextMenu>
  295. </ResourceDictionary>