ViewContent.xaml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:local="clr-namespace:PDF_Office.Views"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:prism="http://prismlibrary.com/"
  12. xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
  13. d:DataContext="{d:DesignInstance Type=viewmodels:ViewContentViewModel}"
  14. d:DesignHeight="450"
  15. d:DesignWidth="800"
  16. prism:ViewModelLocator.AutoWireViewModel="True"
  17. mc:Ignorable="d">
  18. <i:Interaction.Triggers>
  19. <i:EventTrigger EventName="Loaded">
  20. <prism:InvokeCommandAction Command="{Binding Load}" />
  21. </i:EventTrigger>
  22. </i:Interaction.Triggers>
  23. <UserControl.Resources>
  24. <ResourceDictionary />
  25. </UserControl.Resources>
  26. <Grid>
  27. <Grid.RowDefinitions>
  28. <RowDefinition Name="HeadRow" Height="40" />
  29. <RowDefinition Name="ToolRow" Height="40" />
  30. <RowDefinition Height="*" />
  31. <RowDefinition Height="32" />
  32. </Grid.RowDefinitions>
  33. <!-- 左边菜单按钮 -->
  34. <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
  35. <Button
  36. Width="16"
  37. Height="16"
  38. Margin="8"
  39. ToolTip="File" />
  40. <Button
  41. Width="16"
  42. Height="16"
  43. Margin="8"
  44. ToolTip="Save" />
  45. <Button
  46. Width="16"
  47. Height="16"
  48. Margin="8"
  49. ToolTip="Undo" />
  50. <Button
  51. Width="16"
  52. Height="16"
  53. Margin="8"
  54. ToolTip="Redo" />
  55. </StackPanel>
  56. <!-- 右边菜单按钮 -->
  57. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  58. <Button
  59. Width="16"
  60. Height="16"
  61. Margin="8"
  62. ToolTip="Print" />
  63. <Button
  64. Width="16"
  65. Height="16"
  66. Margin="8"
  67. ToolTip="Share" />
  68. <Button
  69. Width="16"
  70. Height="16"
  71. Margin="8"
  72. ToolTip="Property" />
  73. </StackPanel>
  74. <TabControl
  75. x:Name="ToolTabControl"
  76. Grid.Row="0"
  77. Grid.RowSpan="2"
  78. HorizontalAlignment="Center"
  79. VerticalAlignment="Top"
  80. BorderThickness="0"
  81. Style="{StaticResource TabControlWithUnderLineStyle}">
  82. <cus:IconAndTextTabItem
  83. x:Name="TabItemAnnotation"
  84. Header="注释"
  85. Style="{StaticResource TabItem_WithUnderLineStyle}">
  86. <Grid Grid.Row="1" Height="40" />
  87. </cus:IconAndTextTabItem>
  88. <cus:IconAndTextTabItem
  89. x:Name="TabItemPageEdit"
  90. Header="页面"
  91. Style="{StaticResource TabItem_WithUnderLineStyle}" />
  92. <cus:IconAndTextTabItem
  93. x:Name="TabItemConvert"
  94. Header="转换"
  95. Style="{StaticResource TabItem_WithUnderLineStyle}" />
  96. <cus:IconAndTextTabItem
  97. x:Name="TabItemScan"
  98. Header="扫描和OCR"
  99. Style="{StaticResource TabItem_WithUnderLineStyle}">
  100. <Grid Grid.Row="1" Height="40" />
  101. </cus:IconAndTextTabItem>
  102. <cus:IconAndTextTabItem
  103. x:Name="TabItemEdit"
  104. Height="40"
  105. Header="编辑"
  106. Style="{StaticResource TabItem_WithUnderLineStyle}">
  107. <Grid Grid.Row="1" Height="40" />
  108. </cus:IconAndTextTabItem>
  109. <cus:IconAndTextTabItem
  110. x:Name="TabItemForm"
  111. Height="40"
  112. Header="表单"
  113. Style="{StaticResource TabItem_WithUnderLineStyle}">
  114. <Grid Grid.Row="1" Height="40" />
  115. </cus:IconAndTextTabItem>
  116. <cus:IconAndTextTabItem
  117. x:Name="TabItemFill"
  118. Height="40"
  119. Header="填写与签名"
  120. Style="{StaticResource TabItem_WithUnderLineStyle}">
  121. <Grid Grid.Row="1" Height="40" />
  122. </cus:IconAndTextTabItem>
  123. <cus:IconAndTextTabItem
  124. x:Name="TabItemTool"
  125. Height="40"
  126. Header="工具"
  127. Style="{StaticResource TabItem_WithUnderLineStyle}">
  128. <Grid Grid.Row="1" Height="40" />
  129. </cus:IconAndTextTabItem>
  130. <i:Interaction.Triggers>
  131. <i:EventTrigger EventName="SelectionChanged">
  132. <i:InvokeCommandAction Command="{Binding TabControlSelectionChangedCommand}" PassEventArgsToCommand="True" />
  133. </i:EventTrigger>
  134. </i:Interaction.Triggers>
  135. </TabControl>
  136. <Grid Name="DocumentView" Grid.Row="2">
  137. <Grid.ColumnDefinitions>
  138. <ColumnDefinition
  139. x:Name="BOTACloumn"
  140. Width="48"
  141. MinWidth="48"
  142. MaxWidth="400" />
  143. <ColumnDefinition Width="12" />
  144. <ColumnDefinition
  145. Name="ViewerColumn"
  146. Width="*"
  147. MinWidth="200" />
  148. <ColumnDefinition Width="12" />
  149. <ColumnDefinition Name="PropertyColumn" Width="0" />
  150. </Grid.ColumnDefinitions>
  151. <ContentControl prism:RegionManager.RegionName="{Binding BOTARegionName}" />
  152. <GridSplitter
  153. Grid.Column="1"
  154. Width="12"
  155. FocusVisualStyle="{x:Null}"
  156. ResizeBehavior="PreviousAndNext"
  157. ShowsPreview="True" />
  158. <ContentControl
  159. x:Name="PDFViewerContent"
  160. Grid.Column="2"
  161. HorizontalAlignment="Stretch"
  162. prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
  163. <Button Grid.Column="3" />
  164. <ContentControl Grid.Column="4" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
  165. </Grid>
  166. <local:BottomToolContent Grid.Row="3" />
  167. <!-- 用于显示页面编辑、水印、背景、标记密文等功能的区域 -->
  168. <ContentControl
  169. Name="ContentTool"
  170. Grid.Row="{Binding GridToolRow}"
  171. Grid.RowSpan="{Binding GridToolRowSpan}"
  172. prism:RegionManager.RegionName="{Binding ToolContentRegionName}"
  173. Visibility="{Binding ToolContentVisible}" />
  174. <cus:LoadingControl Grid.RowSpan="3" Visibility="{Binding IsLoading}" />
  175. </Grid>
  176. </UserControl>