ViewContent.xaml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  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. KeyDown="UserControl_KeyDown"
  19. mc:Ignorable="d">
  20. <i:Interaction.Triggers>
  21. <i:EventTrigger EventName="Loaded">
  22. <prism:InvokeCommandAction Command="{Binding Load}" />
  23. </i:EventTrigger>
  24. </i:Interaction.Triggers>
  25. <UserControl.Resources>
  26. <ResourceDictionary>
  27. <ResourceDictionary.MergedDictionaries>
  28. <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyle.xaml" />
  29. </ResourceDictionary.MergedDictionaries>
  30. <convert:InvertBoolConvert x:Key="UnBoolConvert" />
  31. <Style x:Key="MenuButtonStyle" TargetType="{x:Type Button}">
  32. <Setter Property="Width" Value="20" />
  33. <Setter Property="Height" Value="20" />
  34. </Style>
  35. <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
  36. </ResourceDictionary>
  37. </UserControl.Resources>
  38. <Grid Background="{StaticResource color.sys.layout.mg}">
  39. <Grid.RowDefinitions>
  40. <RowDefinition Name="HeadRow" Height="40" />
  41. <RowDefinition Name="ToolRow" Height="40" />
  42. <RowDefinition Height="*" />
  43. <RowDefinition Height="32" />
  44. </Grid.RowDefinitions>
  45. <Grid Visibility="{Binding GridVisibility}">
  46. <!-- 左边菜单按钮 -->
  47. <StackPanel
  48. Margin="16,6,0,6"
  49. HorizontalAlignment="Left"
  50. Orientation="Horizontal"
  51. Visibility="{Binding IsReadMode}">
  52. <Button
  53. Name="BtnFile"
  54. Click="BtnFile_Click"
  55. Content="Files"
  56. Initialized="BtnFile_Initialized"
  57. Style="{StaticResource subToolBar}"
  58. ToolTip="{Binding T_File}">
  59. <Button.ContextMenu>
  60. <ContextMenu Name="FileMenu">
  61. <MenuItem
  62. Command="{Binding OpenFileCommand}"
  63. Header="Open Files"
  64. InputGestureText="Ctrl+O" />
  65. <MenuItem
  66. Name="MenuRecent"
  67. Header="Open Recent"
  68. Loaded="MenuRecent_Loaded">
  69. <Separator Name="Menu_Separator" Style="{StaticResource HorizontalSeparatorStyle}" />
  70. <MenuItem
  71. Name="MenuDeleteAll"
  72. Click="MenuDeleteAll_Click"
  73. Header="Delete All" />
  74. </MenuItem>
  75. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  76. <MenuItem Header="Create Files">
  77. <MenuItem Command="{Binding CreateBlankFileCommand}" Header="Create Blank" />
  78. <MenuItem Command="{Binding mainViewModel.homeContentViewModel.CreateFromScanner}" Header="Create Form Scanner" />
  79. </MenuItem>
  80. <MenuItem
  81. Command="{Binding mainViewModel.mainWindowViewModel.AddTab}"
  82. Header="New Tab"
  83. InputGestureText="Ctrl+T" />
  84. <MenuItem Command="{Binding MergeFileCommand}" Header="Merge PDF Files" />
  85. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  86. <MenuItem
  87. Command="{Binding SaveFile}"
  88. Header="Save"
  89. InputGestureText="Ctrl+S" />
  90. <MenuItem
  91. Command="{Binding SaveAsFile}"
  92. Header="Save As"
  93. InputGestureText="Ctrl+Shift+S" />
  94. <MenuItem
  95. Command="{Binding SaveAsFlattenCommand}"
  96. Header="Save as Flattened PDF"
  97. Visibility="Collapsed" />
  98. <MenuItem Command="{Binding CompressCommand}" Header="Compress" />
  99. <MenuItem Header="Convert To">
  100. <MenuItem
  101. Command="{Binding ConvertCommand}"
  102. CommandParameter="Word"
  103. Header="Word" />
  104. <MenuItem
  105. Command="{Binding ConvertCommand}"
  106. CommandParameter="Excel"
  107. Header="Excel" />
  108. <MenuItem
  109. Command="{Binding ConvertCommand}"
  110. CommandParameter="PPT"
  111. Header="PowerPoint" />
  112. <MenuItem
  113. Command="{Binding ConvertCommand}"
  114. CommandParameter="RTF"
  115. Header="RTF" />
  116. <MenuItem
  117. Command="{Binding ConvertCommand}"
  118. CommandParameter="HTML"
  119. Header="HTML" />
  120. <MenuItem
  121. Command="{Binding ConvertCommand}"
  122. CommandParameter="Text"
  123. Header="Text" />
  124. <MenuItem
  125. Command="{Binding ConvertCommand}"
  126. CommandParameter="CSV"
  127. Header="CSV" />
  128. <MenuItem
  129. Command="{Binding ConvertCommand}"
  130. CommandParameter="Image"
  131. Header="图片" />
  132. </MenuItem>
  133. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  134. <MenuItem
  135. Command="{Binding CloseWindowCommand}"
  136. Header="Close Window"
  137. InputGestureText="Ctrl+Shift+W" />
  138. <MenuItem
  139. Command="{Binding mainViewModel.CloseTab}"
  140. Header="Close Tab"
  141. InputGestureText="Ctrl+W" />
  142. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  143. <MenuItem Command="{Binding EncryptCommand}" Header="Set Passwords" />
  144. <MenuItem Command="{Binding DecryptCommand}" Header="Remove Security" />
  145. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  146. <MenuItem Command="{Binding ShowInFolderCommand}" Header="Show in Folder" />
  147. <MenuItem Command="{Binding PropertyCommand}" Header="Properties" />
  148. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  149. <MenuItem Command="{Binding ShareCommand}" Header="Share" />
  150. <MenuItem Command="{Binding PrintCommand}" Header="Print" />
  151. <Separator Margin="8,0" Style="{StaticResource HorizontalSeparatorStyle}" />
  152. <MenuItem
  153. Command="{Binding SettingsCommand}"
  154. Header="Settings"
  155. InputGestureText="Ctrl+P" />
  156. <MenuItem Header="Help">
  157. <MenuItem
  158. Command="{Binding HelpCommand}"
  159. CommandParameter="Guid"
  160. Header="快速教学" />
  161. <MenuItem
  162. Command="{Binding HelpCommand}"
  163. CommandParameter="Online"
  164. Header="在线帮助" />
  165. <MenuItem
  166. Command="{Binding HelpCommand}"
  167. CommandParameter="More"
  168. Header="更多产品" />
  169. <MenuItem
  170. Command="{Binding HelpCommand}"
  171. CommandParameter="Template"
  172. Header="免费PDF模板" />
  173. <MenuItem
  174. Command="{Binding HelpCommand}"
  175. CommandParameter="Blog"
  176. Header="订阅电子报" />
  177. <MenuItem
  178. Command="{Binding HelpCommand}"
  179. CommandParameter="ComPDF"
  180. Header="Powered by ComPDFKit" />
  181. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  182. <MenuItem
  183. Command="{Binding HelpCommand}"
  184. CommandParameter="FeedBack"
  185. Header="意见反馈" />
  186. </MenuItem>
  187. </ContextMenu>
  188. </Button.ContextMenu>
  189. </Button>
  190. <Separator
  191. Width="1"
  192. Height="12"
  193. Margin="8,0"
  194. Background="{StaticResource color.sys.layout.divider}"
  195. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  196. <Button
  197. Command="{Binding SaveFile}"
  198. IsEnabled="{Binding CanSave}"
  199. Style="{StaticResource subToolBar}"
  200. ToolTip="{Binding T_Save}">
  201. <Path
  202. Width="20"
  203. Height="20"
  204. 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"
  205. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  206. </Button>
  207. <Button
  208. Margin="2,0"
  209. Command="{Binding UndoCommand}"
  210. IsEnabled="{Binding CanUndo}"
  211. Style="{StaticResource subToolBar}"
  212. ToolTip="{Binding T_Undo}">
  213. <Path
  214. Width="20"
  215. Height="20"
  216. 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"
  217. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  218. </Button>
  219. <Button
  220. Command="{Binding RedoCommand}"
  221. IsEnabled="{Binding CanRedo}"
  222. Style="{StaticResource subToolBar}"
  223. ToolTip="{Binding T_Redo}">
  224. <Path
  225. Width="20"
  226. Height="20"
  227. 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"
  228. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  229. </Button>
  230. </StackPanel>
  231. <!-- 右边菜单按钮 -->
  232. <StackPanel
  233. Margin="0,6,16,6"
  234. HorizontalAlignment="Right"
  235. Orientation="Horizontal"
  236. Visibility="{Binding IsReadMode}">
  237. <Button
  238. Command="{Binding PrintCommand}"
  239. Style="{StaticResource subToolBar}"
  240. ToolTip="{Binding T_Print}">
  241. <Path
  242. Width="20"
  243. Height="20"
  244. 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"
  245. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  246. </Button>
  247. <Button
  248. Margin="2,0"
  249. Command="{Binding ShareCommand}"
  250. Style="{StaticResource subToolBar}"
  251. ToolTip="{Binding T_Share}">
  252. <Path
  253. Width="20"
  254. Height="20"
  255. 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"
  256. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  257. </Button>
  258. <ToggleButton
  259. Name="TbtnProperty"
  260. Width="28"
  261. Height="28"
  262. BorderThickness="0"
  263. IsChecked="{Binding IsPropertyOpen}"
  264. IsEnabled="{Binding isInPageEdit, Converter={StaticResource UnBoolConvert}}"
  265. Style="{StaticResource SubToolbarTgb}"
  266. ToolTip="{Binding T_Properties}">
  267. <Path
  268. Width="20"
  269. Height="20"
  270. 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"
  271. Fill="{Binding ElementName=TbtnProperty, Path=Foreground}" />
  272. </ToggleButton>
  273. </StackPanel>
  274. <TabControl
  275. x:Name="ToolTabControl"
  276. Grid.Row="0"
  277. Grid.RowSpan="2"
  278. HorizontalAlignment="Center"
  279. VerticalAlignment="Top"
  280. BorderThickness="0"
  281. SelectedIndex="{Binding TabSelectedIndex, Mode=TwoWay}"
  282. Style="{StaticResource TabControlWithUnderLineStyle}"
  283. Visibility="{Binding IsReadMode}">
  284. <cus:IconAndTextTabItem
  285. x:Name="TabItemAnnotation"
  286. Header="{Binding T_Annotation}"
  287. Style="{StaticResource ToolbarTabs}">
  288. <Grid Grid.Row="1" Height="40" />
  289. </cus:IconAndTextTabItem>
  290. <cus:IconAndTextTabItem
  291. x:Name="TabItemPageEdit"
  292. Header="{Binding T_PageEdit}"
  293. Style="{StaticResource ToolbarTabs}" />
  294. <cus:IconAndTextTabItem
  295. x:Name="TabItemConvert"
  296. Header="{Binding T_Converter}"
  297. Style="{StaticResource ToolbarTabs}" />
  298. <cus:IconAndTextTabItem
  299. x:Name="TabItemScan"
  300. Header="扫描和OCR"
  301. Style="{StaticResource ToolbarTabs}"
  302. Visibility="Collapsed">
  303. <Grid Grid.Row="1" Height="40" />
  304. </cus:IconAndTextTabItem>
  305. <cus:IconAndTextTabItem
  306. x:Name="TabItemEdit"
  307. Height="40"
  308. Header="编辑"
  309. Style="{StaticResource ToolbarTabs}"
  310. Visibility="Collapsed">
  311. <Grid Grid.Row="1" Height="40" />
  312. </cus:IconAndTextTabItem>
  313. <cus:IconAndTextTabItem
  314. x:Name="TabItemForm"
  315. Height="40"
  316. Header="表单"
  317. Style="{StaticResource ToolbarTabs}"
  318. Visibility="Collapsed">
  319. <Grid Grid.Row="1" Height="40" />
  320. </cus:IconAndTextTabItem>
  321. <cus:IconAndTextTabItem
  322. x:Name="TabItemFill"
  323. Height="40"
  324. Header="{Binding T_FillSign}"
  325. Style="{StaticResource ToolbarTabs}">
  326. <Grid Grid.Row="1" Height="40" />
  327. </cus:IconAndTextTabItem>
  328. <cus:IconAndTextTabItem
  329. x:Name="TabItemTool"
  330. Height="40"
  331. Header="{Binding T_Tools}"
  332. Style="{StaticResource ToolbarTabs}">
  333. <Grid Grid.Row="1" Height="40" />
  334. </cus:IconAndTextTabItem>
  335. <i:Interaction.Triggers>
  336. <i:EventTrigger EventName="SelectionChanged">
  337. <i:InvokeCommandAction Command="{Binding TabControlSelectionChangedCommand}" PassEventArgsToCommand="True" />
  338. </i:EventTrigger>
  339. </i:Interaction.Triggers>
  340. </TabControl>
  341. </Grid>
  342. <!-- 底部工具栏 -->
  343. <ContentControl Grid.Row="3" prism:RegionManager.RegionName="{Binding BottomToolRegionName}" />
  344. <!-- 专门用来显示菜单二级工具栏 -->
  345. <!-- 调整工具栏的显示图层,方便阅读模式处理 -->
  346. <ContentControl
  347. Name="ContentToolsBar"
  348. Grid.Row="{Binding GridToolRow}"
  349. prism:RegionManager.RegionName="{Binding ToolsBarContentRegionName}"
  350. Visibility="{Binding ToolsBarContentVisible}" />
  351. <ContentControl
  352. Name="ContentConverterBar"
  353. Grid.Row="{Binding GridToolRow}"
  354. prism:RegionManager.RegionName="{Binding ConverterBarContentRegionName}"
  355. Visibility="{Binding ConverterBarContentVisible}" />
  356. <ContentControl
  357. Name="TextEditContentBar"
  358. Grid.Row="{Binding GridToolRow}"
  359. prism:RegionManager.RegionName="{Binding TextEditContentRegionName}"
  360. Visibility="{Binding TextEditToolContentVisible}" />
  361. <Grid Name="DocumentView" Grid.Row="2">
  362. <Grid.ColumnDefinitions>
  363. <ColumnDefinition
  364. x:Name="BOTACloumn"
  365. Width="{Binding BOTAWidth, Mode=TwoWay}"
  366. MinWidth="48"
  367. MaxWidth="472" />
  368. <ColumnDefinition Width="auto" />
  369. <ColumnDefinition
  370. Name="ViewerColumn"
  371. Width="*"
  372. MinWidth="200" />
  373. <ColumnDefinition Name="PropertyColumn" MinWidth="0">
  374. <ColumnDefinition.Style>
  375. <Style TargetType="{x:Type ColumnDefinition}">
  376. <Style.Triggers>
  377. <DataTrigger Binding="{Binding ElementName=TbtnProperty, Path=IsChecked}" Value="True">
  378. <Setter Property="Width" Value="260" />
  379. </DataTrigger>
  380. <DataTrigger Binding="{Binding ElementName=TbtnProperty, Path=IsChecked}" Value="False">
  381. <Setter Property="Width" Value="0" />
  382. </DataTrigger>
  383. </Style.Triggers>
  384. </Style>
  385. </ColumnDefinition.Style>
  386. </ColumnDefinition>
  387. </Grid.ColumnDefinitions>
  388. <ContentControl prism:RegionManager.RegionName="{Binding BOTARegionName}" SizeChanged="ContentControl_SizeChanged" />
  389. <GridSplitter
  390. Name="BOTASplitter"
  391. Grid.Column="1"
  392. Width="3"
  393. Background="Transparent"
  394. Cursor="SizeWE"
  395. FocusVisualStyle="{x:Null}"
  396. ResizeBehavior="PreviousAndNext"
  397. ShowsPreview="True" />
  398. <Grid Name="GridViewer" Grid.Column="2">
  399. <!-- 分屏功能需要的布局 -->
  400. <Grid.RowDefinitions>
  401. <RowDefinition Height="*" />
  402. <RowDefinition Height="auto" />
  403. <RowDefinition Name="RowRight" Height="0" />
  404. </Grid.RowDefinitions>
  405. <Grid.ColumnDefinitions>
  406. <ColumnDefinition Width="*" />
  407. <ColumnDefinition Name="ColumnSplitter" Width="auto" />
  408. <ColumnDefinition Name="ColumnBottom" Width="0" />
  409. </Grid.ColumnDefinitions>
  410. <ContentControl />
  411. <ContentControl
  412. x:Name="PDFViewerContent"
  413. HorizontalAlignment="Stretch"
  414. prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
  415. <ContentControl
  416. Name="SplitPDFViewer"
  417. Grid.Row="2"
  418. Grid.Column="2"
  419. prism:RegionManager.RegionName="{Binding SplitViewerRegionName}" />
  420. <GridSplitter
  421. Name="VerticalSplitter"
  422. Grid.Column="1"
  423. Width="12"
  424. Background="Gray"
  425. BorderThickness="0"
  426. ResizeBehavior="PreviousAndNext"
  427. ShowsPreview="True"
  428. Visibility="Collapsed" />
  429. <GridSplitter
  430. Name="HorizontalSplitter"
  431. Grid.Row="1"
  432. Height="12"
  433. HorizontalAlignment="Stretch"
  434. Background="Gray"
  435. BorderThickness="0"
  436. ResizeBehavior="PreviousAndNext"
  437. ShowsPreview="True"
  438. Visibility="Collapsed" />
  439. </Grid>
  440. <ContentControl
  441. x:Name="OCRViewerContent"
  442. Grid.ColumnSpan="3"
  443. HorizontalAlignment="Stretch"
  444. prism:RegionManager.RegionName="{Binding OCRViewerRegionName}"
  445. Visibility="{Binding OCRContentVisible}" />
  446. <ScrollViewer
  447. Name="Scroller"
  448. Grid.Column="4"
  449. Focusable="False"
  450. VerticalScrollBarVisibility="Auto">
  451. <ContentControl Height="{Binding ElementName=Scroller, Path=ViewportHeight}" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
  452. </ScrollViewer>
  453. <!-- 阅读页顶部提示栏区域 -->
  454. <ContentControl
  455. Grid.Column="2"
  456. Width="{Binding ElementName=PDFViewerContent, Path=Width}"
  457. VerticalAlignment="Top"
  458. prism:RegionManager.RegionName="{Binding TipContentRegionName}"
  459. Visibility="{Binding TipVisible}" />
  460. <!-- 阅读页顶部侧面提示区域 -->
  461. <ContentControl
  462. Grid.Column="2"
  463. Margin="16,8"
  464. HorizontalAlignment="Right"
  465. VerticalAlignment="Top"
  466. prism:RegionManager.RegionName="{Binding LeftTipContentRegionName}"
  467. Visibility="{Binding LeftTipVisible}" />
  468. </Grid>
  469. <!-- 用于显示页面编辑、水印、背景、标记密文等功能的区域 -->
  470. <Border
  471. Grid.Row="{Binding GridToolRow}"
  472. Grid.RowSpan="{Binding GridToolRowSpan}"
  473. BorderBrush="{StaticResource color.sys.layout.divider}"
  474. BorderThickness="0,1"
  475. Visibility="{Binding ToolContentVisible}">
  476. <ContentControl Name="ContentTool" prism:RegionManager.RegionName="{Binding ToolContentRegionName}" />
  477. </Border>
  478. <cus:LoadingControl Grid.RowSpan="3" Visibility="{Binding IsLoading}" />
  479. </Grid>
  480. </UserControl>