ViewContent.xaml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. <UserControl
  2. x:Class="PDF_Office.Views.ViewContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:Viewer="clr-namespace:ComPDFKitViewer.PdfViewer;assembly=ComPDFKit.Viewer"
  6. xmlns:convert="clr-namespace:PDF_Office.DataConvert"
  7. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  8. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  9. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:local="clr-namespace:PDF_Office.Views"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:prism="http://prismlibrary.com/"
  13. xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
  14. d:DataContext="{d:DesignInstance Type=viewmodels:ViewContentViewModel}"
  15. d:DesignHeight="450"
  16. d:DesignWidth="800"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. AllowDrop="True"
  19. DragEnter="UserControl_DragEnter"
  20. DragLeave="UserControl_DragLeave"
  21. DragOver="UserControl_DragOver"
  22. Drop="UserControl_Drop"
  23. KeyDown="UserControl_KeyDown"
  24. mc:Ignorable="d">
  25. <i:Interaction.Triggers>
  26. <i:EventTrigger EventName="Loaded">
  27. <prism:InvokeCommandAction Command="{Binding Load}" />
  28. </i:EventTrigger>
  29. <i:EventTrigger EventName="PreviewMouseDown">
  30. <prism:InvokeCommandAction Command="{Binding MouseDown}" />
  31. </i:EventTrigger>
  32. </i:Interaction.Triggers>
  33. <UserControl.Resources>
  34. <ResourceDictionary>
  35. <ResourceDictionary.MergedDictionaries>
  36. <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyle.xaml" />
  37. </ResourceDictionary.MergedDictionaries>
  38. <convert:InvertBoolConvert x:Key="UnBoolConvert" />
  39. <Style x:Key="MenuButtonStyle" TargetType="{x:Type Button}">
  40. <Setter Property="Width" Value="20" />
  41. <Setter Property="Height" Value="20" />
  42. </Style>
  43. <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
  44. <RoutedUICommand x:Key="CloseLeft" Text="CloseLeft"/>
  45. <RoutedUICommand x:Key="CloseRight" Text="CloseRight"/>
  46. </ResourceDictionary>
  47. </UserControl.Resources>
  48. <UserControl.InputBindings>
  49. <KeyBinding Command="{StaticResource CloseLeft}" Modifiers="Ctrl" Key="F4" />
  50. <KeyBinding Command="{StaticResource CloseRight}" Modifiers="Ctrl+Shift" Key="F4" />
  51. <KeyBinding Command="{Binding OpenFileCommand}" Gesture="Ctrl+O"></KeyBinding>
  52. <KeyBinding Command="{Binding mainViewModel.mainWindowViewModel.AddTab}" Gesture="Ctrl+T"></KeyBinding>
  53. <KeyBinding Command="{Binding SaveFile}" Gesture="Ctrl+S"></KeyBinding>
  54. <KeyBinding Command="{Binding SaveAsFile}" Gesture="Ctrl+Shift+S"></KeyBinding>
  55. <KeyBinding Command="{Binding CloseWindowCommand}" Gesture="Ctrl+Shift+W"></KeyBinding>
  56. <KeyBinding Command="{Binding mainViewModel.CloseTab}" Gesture="Ctrl+W"></KeyBinding>
  57. <KeyBinding Command="{Binding SettingsCommand}" Gesture="Ctrl+P"></KeyBinding>
  58. </UserControl.InputBindings>
  59. <UserControl.CommandBindings>
  60. <CommandBinding x:Name="CloseLeftCommand" Command="{StaticResource CloseLeft}" Executed="CloseLeftCommand_Executed"/>
  61. <CommandBinding x:Name="CloseRightCommand" Command="{StaticResource CloseRight}" Executed="CloseRightCommand_Executed"/>
  62. </UserControl.CommandBindings>
  63. <Grid Background="{StaticResource color.sys.layout.mg}">
  64. <Grid.RowDefinitions>
  65. <RowDefinition Name="HeadRow" Height="40" />
  66. <RowDefinition Name="ToolRow" Height="40" />
  67. <RowDefinition Height="*" />
  68. <RowDefinition Height="32" />
  69. </Grid.RowDefinitions>
  70. <Grid Visibility="{Binding GridVisibility}">
  71. <!-- 左边菜单按钮 -->
  72. <StackPanel
  73. Margin="16,6,0,6"
  74. HorizontalAlignment="Left"
  75. Orientation="Horizontal"
  76. Visibility="{Binding IsReadMode}">
  77. <Button
  78. Name="BtnFile"
  79. Click="BtnFile_Click"
  80. Content="Files"
  81. Initialized="BtnFile_Initialized"
  82. Style="{StaticResource subToolBar}"
  83. ToolTip="{Binding T_File}">
  84. <Button.ContextMenu>
  85. <ContextMenu Name="FileMenu">
  86. <MenuItem
  87. Command="{Binding OpenFileCommand}"
  88. Header="Open Files"
  89. InputGestureText="Ctrl+O" />
  90. <MenuItem
  91. Name="MenuRecent"
  92. Header="Open Recent"
  93. Loaded="MenuRecent_Loaded">
  94. <Separator Name="Menu_Separator" Style="{StaticResource HorizontalSeparatorStyle}" />
  95. <MenuItem
  96. Name="MenuDeleteAll"
  97. Click="MenuDeleteAll_Click"
  98. Header="Delete All" />
  99. </MenuItem>
  100. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  101. <MenuItem Header="Create Files">
  102. <MenuItem Command="{Binding CreateBlankFileCommand}" Header="Create Blank" />
  103. <MenuItem Command="{Binding mainViewModel.homeContentViewModel.CreateFromScanner}" Header="Create Form Scanner" />
  104. </MenuItem>
  105. <MenuItem
  106. Command="{Binding mainViewModel.mainWindowViewModel.AddTab}"
  107. Header="New Tab"
  108. InputGestureText="Ctrl+T" />
  109. <MenuItem Command="{Binding MergeFileCommand}" Header="Merge PDF Files" />
  110. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  111. <MenuItem
  112. Command="{Binding SaveFile}"
  113. Header="Save"
  114. InputGestureText="Ctrl+S" />
  115. <MenuItem
  116. Command="{Binding SaveAsFile}"
  117. Header="Save As"
  118. InputGestureText="Ctrl+Shift+S" />
  119. <MenuItem
  120. Command="{Binding SaveAsFlattenCommand}"
  121. Header="Save as Flattened PDF"
  122. Visibility="Collapsed" />
  123. <MenuItem Command="{Binding CompressCommand}" Header="Compress" />
  124. <MenuItem Header="Convert To">
  125. <MenuItem
  126. Command="{Binding ConvertCommand}"
  127. CommandParameter="Word"
  128. Header="Word" />
  129. <MenuItem
  130. Command="{Binding ConvertCommand}"
  131. CommandParameter="Excel"
  132. Header="Excel" />
  133. <MenuItem
  134. Command="{Binding ConvertCommand}"
  135. CommandParameter="PPT"
  136. Header="PowerPoint" />
  137. <MenuItem
  138. Command="{Binding ConvertCommand}"
  139. CommandParameter="RTF"
  140. Header="RTF" />
  141. <MenuItem
  142. Command="{Binding ConvertCommand}"
  143. CommandParameter="HTML"
  144. Header="HTML" />
  145. <MenuItem
  146. Command="{Binding ConvertCommand}"
  147. CommandParameter="Text"
  148. Header="Text" />
  149. <MenuItem
  150. Command="{Binding ConvertCommand}"
  151. CommandParameter="CSV"
  152. Header="CSV" />
  153. <MenuItem
  154. Command="{Binding ConvertCommand}"
  155. CommandParameter="Image"
  156. Header="图片" />
  157. </MenuItem>
  158. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  159. <MenuItem
  160. Command="{Binding CloseWindowCommand}"
  161. Header="Close Window"
  162. InputGestureText="Ctrl+Shift+W" />
  163. <MenuItem
  164. Command="{Binding mainViewModel.CloseTab}"
  165. Header="Close Tab"
  166. InputGestureText="Ctrl+W" />
  167. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  168. <MenuItem Command="{Binding EncryptCommand}" Header="Set Passwords" />
  169. <MenuItem Command="{Binding DecryptCommand}" Header="Remove Security" />
  170. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  171. <MenuItem Command="{Binding ShowInFolderCommand}" Header="Show in Folder" />
  172. <MenuItem Command="{Binding PropertyCommand}" Header="Properties" />
  173. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  174. <MenuItem Command="{Binding ShareCommand}" Header="Share" />
  175. <MenuItem Command="{Binding PrintCommand}" Header="Print" />
  176. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  177. <MenuItem
  178. Command="{Binding SettingsCommand}"
  179. Header="Settings"
  180. InputGestureText="Ctrl+P" />
  181. <MenuItem Header="Help">
  182. <MenuItem
  183. Command="{Binding HelpCommand}"
  184. CommandParameter="Guid"
  185. Header="快速教学" />
  186. <MenuItem
  187. Command="{Binding HelpCommand}"
  188. CommandParameter="Online"
  189. Header="在线帮助" />
  190. <MenuItem
  191. Command="{Binding HelpCommand}"
  192. CommandParameter="More"
  193. Header="更多产品" />
  194. <MenuItem
  195. Command="{Binding HelpCommand}"
  196. CommandParameter="Template"
  197. Header="免费PDF模板" />
  198. <MenuItem
  199. Command="{Binding HelpCommand}"
  200. CommandParameter="Blog"
  201. Header="订阅电子报" />
  202. <MenuItem
  203. Command="{Binding HelpCommand}"
  204. CommandParameter="ComPDF"
  205. Header="Powered by ComPDFKit" />
  206. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  207. <MenuItem
  208. Command="{Binding HelpCommand}"
  209. CommandParameter="FeedBack"
  210. Header="意见反馈" />
  211. </MenuItem>
  212. </ContextMenu>
  213. </Button.ContextMenu>
  214. </Button>
  215. <Separator
  216. Width="1"
  217. Height="12"
  218. Margin="8,0"
  219. Background="{StaticResource color.sys.layout.divider}"
  220. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  221. <Button
  222. Command="{Binding SaveFile}"
  223. IsEnabled="{Binding CanSave}"
  224. Style="{StaticResource subToolBar}"
  225. ToolTip="{Binding T_Save}">
  226. <Path
  227. Width="20"
  228. Height="20"
  229. Data="M16 16V6.82843L13.1716 4H12V8C12 9.10457 11.1046 10 10 10H7C5.89543 10 5 9.10457 5 8V4H4V16H16ZM7 4H10V8H7V4ZM13.1716 2H12H10H7H5H4C2.89543 2 2 2.89543 2 4V16C2 17.1046 2.89543 18 4 18H16C17.1046 18 18 17.1046 18 16V6.82843C18 6.29799 17.7893 5.78929 17.4142 5.41421L14.5858 2.58579C14.2107 2.21071 13.702 2 13.1716 2ZM9.25 5H7.75V7H9.25V5Z"
  230. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  231. </Button>
  232. <Button
  233. Margin="2,0"
  234. Command="{Binding UndoCommand}"
  235. IsEnabled="{Binding CanUndo}"
  236. Style="{StaticResource subToolBar}"
  237. ToolTip="{Binding T_Undo}">
  238. <Path
  239. Width="20"
  240. Height="20"
  241. Data="M5.75766 8.00008L6.70741 8.94982L5.2932 10.364L2.46477 7.53561C2.07424 7.14508 2.07424 6.51192 2.46477 6.1214L5.2932 3.29297L6.70741 4.70718L5.41451 6.00008H12.5001C15.5377 6.00008 18.0001 8.46251 18.0001 11.5001C18.0001 14.5376 15.5377 17.0001 12.5001 17.0001H3.00012V15.0001H12.5001C14.4331 15.0001 16.0001 13.4331 16.0001 11.5001C16.0001 9.56708 14.4331 8.00008 12.5001 8.00008H5.75766Z"
  242. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  243. </Button>
  244. <Button
  245. Command="{Binding RedoCommand}"
  246. IsEnabled="{Binding CanRedo}"
  247. Style="{StaticResource subToolBar}"
  248. ToolTip="{Binding T_Redo}">
  249. <Path
  250. Width="20"
  251. Height="20"
  252. Data="M14.2424 8.00006L13.2926 8.94982L14.7068 10.364L17.5352 7.53561C17.9258 7.14508 17.9258 6.51192 17.5352 6.1214L14.7068 3.29297L13.2926 4.70718L14.5855 6.00006H7.49969C4.46213 6.00006 1.9997 8.46249 1.9997 11.5001C1.9997 14.5376 4.46213 17.0001 7.4997 17.0001H16.9997V15.0001H7.4997C5.5667 15.0001 3.9997 13.4331 3.9997 11.5001C3.9997 9.56706 5.5667 8.00006 7.49969 8.00006H14.2424Z"
  253. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  254. </Button>
  255. </StackPanel>
  256. <!-- 右边菜单按钮 -->
  257. <StackPanel
  258. Margin="0,6,16,6"
  259. HorizontalAlignment="Right"
  260. Orientation="Horizontal"
  261. Visibility="{Binding IsReadMode}">
  262. <Button
  263. Command="{Binding PrintCommand}"
  264. Style="{StaticResource subToolBar}"
  265. ToolTip="{Binding T_Print}">
  266. <Path
  267. Width="20"
  268. Height="20"
  269. Data="M17 6.99999H14.8203C14.7973 7.00126 14.7741 7.0019 14.7508 7.0019L10.0008 7.00254L5.25081 7.00319C5.22047 7.00319 5.19038 7.00211 5.16058 6.99999H3C2.44772 6.99999 2 7.44771 2 7.99999V13.75C2 13.8881 2.11193 14 2.25 14H4V13.25C4 12.5596 4.55964 12 5.25 12H14.75C15.4404 12 16 12.5596 16 13.25V14H17.75C17.8881 14 18 13.8881 18 13.75V7.99999C18 7.44771 17.5523 6.99999 17 6.99999ZM16 16H17.75C18.9926 16 20 14.9926 20 13.75V7.99999C20 6.34314 18.6569 4.99999 17 4.99999H16.0005L16.0002 2.24837C16.0001 1.55801 15.4404 0.998442 14.75 0.998535L5.25 0.999822C4.55964 0.999916 4.00008 1.55964 4.00017 2.24999L4.00054 4.99999H3C1.34315 4.99999 0 6.34314 0 7.99999V13.75C0 14.9926 1.00736 16 2.25 16H4V17.75C4 18.4403 4.55964 19 5.25 19H14.75C15.4404 19 16 18.4403 16 17.75V16ZM6.00027 2.99972L6.00054 4.99999H14.0005L14.0003 2.99864L6.00027 2.99972ZM14 8.49999V10.5H16V8.49999H14ZM6 17V14H14V17H6Z"
  270. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  271. </Button>
  272. <Button
  273. Margin="2,0"
  274. Command="{Binding ShareCommand}"
  275. Style="{StaticResource subToolBar}"
  276. ToolTip="{Binding T_Share}">
  277. <Path
  278. Width="20"
  279. Height="20"
  280. Data="M15.0858 3.5H11.25V1.5H16.6395C17.667 1.5 18.5 2.33298 18.5 3.36051V8.75H16.5V4.91421L11.136 10.2782L9.72183 8.86396L15.0858 3.5ZM4.25 4C4.11193 4 4 4.11193 4 4.25V15.75C4 15.8881 4.11193 16 4.25 16H15.75C15.8881 16 16 15.8881 16 15.75V10.875H18V15.75C18 16.9926 16.9926 18 15.75 18H4.25C3.00736 18 2 16.9926 2 15.75V4.25C2 3.00736 3.00736 2 4.25 2H9.125V4H4.25Z"
  281. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  282. </Button>
  283. <ToggleButton
  284. Name="TbtnProperty"
  285. Width="28"
  286. Height="28"
  287. BorderThickness="0"
  288. IsChecked="{Binding IsPropertyOpen}"
  289. IsEnabled="{Binding isInPageEdit, Converter={StaticResource UnBoolConvert}}"
  290. Style="{StaticResource SubToolbarTgb}"
  291. ToolTip="{Binding T_Properties}">
  292. <Path
  293. Width="20"
  294. Height="20"
  295. Data="M2 4V7H18V4H2ZM2 16V9H13V16H2ZM15 16H18V9H15V16ZM1.72101 2C0.770524 2 0 2.77052 0 3.72101V16.279C0 17.2295 0.770524 18 1.72101 18H18.279C19.2295 18 20 17.2295 20 16.279V3.72101C20 2.77052 19.2295 2 18.279 2H1.72101Z"
  296. Fill="{Binding ElementName=TbtnProperty, Path=Foreground}" />
  297. </ToggleButton>
  298. </StackPanel>
  299. <TabControl
  300. x:Name="ToolTabControl"
  301. Grid.Row="0"
  302. Grid.RowSpan="2"
  303. HorizontalAlignment="Center"
  304. VerticalAlignment="Top"
  305. BorderThickness="0"
  306. SelectedIndex="{Binding TabSelectedIndex, Mode=TwoWay}"
  307. Style="{StaticResource TabControlWithUnderLineStyle}"
  308. Visibility="{Binding IsReadMode}">
  309. <cus:IconAndTextTabItem
  310. x:Name="TabItemAnnotation"
  311. Header="{Binding T_Annotation}"
  312. Style="{StaticResource ToolbarTabs}">
  313. <Grid Grid.Row="1" Height="40" />
  314. </cus:IconAndTextTabItem>
  315. <cus:IconAndTextTabItem
  316. x:Name="TabItemPageEdit"
  317. Header="{Binding T_PageEdit}"
  318. Style="{StaticResource ToolbarTabs}" />
  319. <cus:IconAndTextTabItem
  320. x:Name="TabItemConvert"
  321. Header="{Binding T_Converter}"
  322. Style="{StaticResource ToolbarTabs}" />
  323. <cus:IconAndTextTabItem
  324. x:Name="TabItemScan"
  325. Header="扫描和OCR"
  326. Style="{StaticResource ToolbarTabs}"
  327. Visibility="Collapsed">
  328. <Grid Grid.Row="1" Height="40" />
  329. </cus:IconAndTextTabItem>
  330. <cus:IconAndTextTabItem
  331. x:Name="TabItemEdit"
  332. Height="40"
  333. Header="编辑"
  334. Style="{StaticResource ToolbarTabs}"
  335. Visibility="Collapsed">
  336. <Grid Grid.Row="1" Height="40" />
  337. </cus:IconAndTextTabItem>
  338. <cus:IconAndTextTabItem
  339. x:Name="TabItemForm"
  340. Height="40"
  341. Header="表单"
  342. Style="{StaticResource ToolbarTabs}"
  343. Visibility="Collapsed">
  344. <Grid Grid.Row="1" Height="40" />
  345. </cus:IconAndTextTabItem>
  346. <cus:IconAndTextTabItem
  347. x:Name="TabItemFill"
  348. Height="40"
  349. Header="{Binding T_FillSign}"
  350. Style="{StaticResource ToolbarTabs}">
  351. <Grid Grid.Row="1" Height="40" />
  352. </cus:IconAndTextTabItem>
  353. <cus:IconAndTextTabItem
  354. x:Name="TabItemTool"
  355. Height="40"
  356. Header="{Binding T_Tools}"
  357. Style="{StaticResource ToolbarTabs}">
  358. <Grid Grid.Row="1" Height="40" />
  359. </cus:IconAndTextTabItem>
  360. <i:Interaction.Triggers>
  361. <i:EventTrigger EventName="SelectionChanged">
  362. <i:InvokeCommandAction Command="{Binding TabControlSelectionChangedCommand}" PassEventArgsToCommand="True" />
  363. </i:EventTrigger>
  364. </i:Interaction.Triggers>
  365. </TabControl>
  366. </Grid>
  367. <!-- 底部工具栏 -->
  368. <ContentControl Grid.Row="3" prism:RegionManager.RegionName="{Binding BottomToolRegionName}" />
  369. <!-- 专门用来显示菜单二级工具栏 -->
  370. <!-- 调整工具栏的显示图层,方便阅读模式处理 -->
  371. <ContentControl
  372. Name="ContentToolsBar"
  373. Grid.Row="{Binding GridToolRow}"
  374. prism:RegionManager.RegionName="{Binding ToolsBarContentRegionName}"
  375. Visibility="{Binding ToolsBarContentVisible}" />
  376. <ContentControl
  377. Name="ContentConverterBar"
  378. Grid.Row="{Binding GridToolRow}"
  379. prism:RegionManager.RegionName="{Binding ConverterBarContentRegionName}"
  380. Visibility="{Binding ConverterBarContentVisible}" />
  381. <ContentControl
  382. Name="TextEditContentBar"
  383. Grid.Row="{Binding GridToolRow}"
  384. prism:RegionManager.RegionName="{Binding TextEditContentRegionName}"
  385. Visibility="{Binding TextEditToolContentVisible}" />
  386. <Grid Name="DocumentView" Grid.Row="2">
  387. <Grid.ColumnDefinitions>
  388. <ColumnDefinition
  389. x:Name="BOTACloumn"
  390. Width="{Binding BOTAWidth, Mode=TwoWay}"
  391. MinWidth="48"
  392. MaxWidth="472" />
  393. <ColumnDefinition Width="auto" />
  394. <ColumnDefinition
  395. Name="ViewerColumn"
  396. Width="*"
  397. MinWidth="200" />
  398. <ColumnDefinition Name="PropertyColumn" MinWidth="0">
  399. <ColumnDefinition.Style>
  400. <Style TargetType="{x:Type ColumnDefinition}">
  401. <Style.Triggers>
  402. <DataTrigger Binding="{Binding ElementName=TbtnProperty, Path=IsChecked}" Value="True">
  403. <Setter Property="Width" Value="260" />
  404. </DataTrigger>
  405. <DataTrigger Binding="{Binding ElementName=TbtnProperty, Path=IsChecked}" Value="False">
  406. <Setter Property="Width" Value="0" />
  407. </DataTrigger>
  408. </Style.Triggers>
  409. </Style>
  410. </ColumnDefinition.Style>
  411. </ColumnDefinition>
  412. </Grid.ColumnDefinitions>
  413. <ContentControl prism:RegionManager.RegionName="{Binding BOTARegionName}" SizeChanged="ContentControl_SizeChanged" />
  414. <GridSplitter
  415. Name="BOTASplitter"
  416. Grid.Column="1"
  417. Width="3"
  418. Background="Transparent"
  419. Cursor="SizeWE"
  420. FocusVisualStyle="{x:Null}"
  421. ResizeBehavior="PreviousAndNext"
  422. ShowsPreview="True" />
  423. <Grid Name="GridViewer" Grid.Column="2">
  424. <!-- 分屏功能需要的布局 -->
  425. <Grid.RowDefinitions>
  426. <RowDefinition Height="*" />
  427. <RowDefinition Height="auto" />
  428. <RowDefinition Name="RowRight" Height="0" />
  429. </Grid.RowDefinitions>
  430. <Grid.ColumnDefinitions>
  431. <ColumnDefinition Width="*" />
  432. <ColumnDefinition Name="ColumnSplitter" Width="auto" />
  433. <ColumnDefinition Name="ColumnBottom" Width="0" />
  434. </Grid.ColumnDefinitions>
  435. <ContentControl />
  436. <ContentControl
  437. x:Name="PDFViewerContent"
  438. HorizontalAlignment="Stretch"
  439. prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
  440. <ContentControl
  441. Name="SplitPDFViewer"
  442. Grid.Row="2"
  443. Grid.Column="2"
  444. prism:RegionManager.RegionName="{Binding SplitViewerRegionName}" />
  445. <GridSplitter
  446. Name="VerticalSplitter"
  447. Grid.Column="1"
  448. Width="12"
  449. Background="Gray"
  450. BorderThickness="0"
  451. ResizeBehavior="PreviousAndNext"
  452. ShowsPreview="True"
  453. Visibility="Collapsed" />
  454. <GridSplitter
  455. Name="HorizontalSplitter"
  456. Grid.Row="1"
  457. Height="12"
  458. HorizontalAlignment="Stretch"
  459. Background="Gray"
  460. BorderThickness="0"
  461. ResizeBehavior="PreviousAndNext"
  462. ShowsPreview="True"
  463. Visibility="Collapsed" />
  464. </Grid>
  465. <ContentControl
  466. x:Name="OCRViewerContent"
  467. Grid.ColumnSpan="3"
  468. HorizontalAlignment="Stretch"
  469. prism:RegionManager.RegionName="{Binding OCRViewerRegionName}"
  470. Visibility="{Binding OCRContentVisible}" />
  471. <ScrollViewer
  472. Name="Scroller"
  473. Grid.Column="4"
  474. Focusable="False"
  475. VerticalScrollBarVisibility="Auto">
  476. <ContentControl Height="{Binding ElementName=Scroller, Path=ViewportHeight}" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
  477. </ScrollViewer>
  478. <!-- 阅读页顶部提示栏区域 -->
  479. <ContentControl
  480. Grid.Column="2"
  481. Width="{Binding ElementName=PDFViewerContent, Path=Width}"
  482. VerticalAlignment="Top"
  483. prism:RegionManager.RegionName="{Binding TipContentRegionName}"
  484. Visibility="{Binding TipVisible}" />
  485. <!-- 阅读页顶部侧面提示区域 -->
  486. <ContentControl
  487. Grid.Column="2"
  488. Margin="16,8"
  489. HorizontalAlignment="Right"
  490. VerticalAlignment="Top"
  491. prism:RegionManager.RegionName="{Binding LeftTipContentRegionName}"
  492. Visibility="{Binding LeftTipVisible}" />
  493. <!-- 便签弹窗 -->
  494. <Canvas
  495. x:Name="CanvasNote"
  496. Grid.Column="2"
  497. Visibility="{Binding NotePopupVisible}">
  498. <StackPanel Canvas.Left="{Binding CanvasNoteLeft}" Canvas.Bottom="{Binding CanvasNoteBottom}">
  499. <!--<TextBlock Text="000" />-->
  500. <ContentControl prism:RegionManager.RegionName="{Binding NotePopupRegionName}" />
  501. </StackPanel>
  502. </Canvas>
  503. </Grid>
  504. <!-- 用于显示页面编辑、水印、背景、标记密文等功能的区域 -->
  505. <Border
  506. Grid.Row="{Binding GridToolRow}"
  507. Grid.RowSpan="{Binding GridToolRowSpan}"
  508. BorderBrush="{StaticResource color.sys.layout.divider}"
  509. BorderThickness="0,1"
  510. Visibility="{Binding ToolContentVisible}">
  511. <ContentControl Name="ContentTool" prism:RegionManager.RegionName="{Binding ToolContentRegionName}" />
  512. </Border>
  513. <cus:LoadingControl Grid.RowSpan="3" Visibility="{Binding IsLoading}" />
  514. </Grid>
  515. </UserControl>