ScreenAnnotationDialog.xaml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.BOTA.ScreenAnnotationDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:DataConvert="clr-namespace:PDF_Master.DataConvert"
  6. xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:dialogBOTA="clr-namespace:PDF_Master.ViewModels.Dialog.BOTA"
  9. xmlns:helper="clr-namespace:PDF_Master.Helper"
  10. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  11. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.BOTA"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:prism="http://prismlibrary.com/"
  14. Width="380"
  15. MinHeight="400"
  16. d:DataContext="{d:DesignInstance Type=dialogBOTA:ScreenAnnotationDialogViewModel}"
  17. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. mc:Ignorable="d">
  20. <UserControl.Resources>
  21. <ResourceDictionary>
  22. <ResourceDictionary.MergedDictionaries>
  23. <ResourceDictionary Source="pack://application:,,,/Styles/ListViewStyle.xaml" />
  24. <ResourceDictionary Source="pack://application:,,,/Styles/CustomBtnStyle.xaml" />
  25. </ResourceDictionary.MergedDictionaries>
  26. <DataConvert:ObjectConvert x:Key="ObjectConvert" />
  27. <SolidColorBrush x:Key="path.fill" Color="#273C62" />
  28. <DataTemplate x:Key="ListColorData">
  29. <Border
  30. Width="20"
  31. Height="20"
  32. Margin="6">
  33. <Ellipse
  34. Name="EllipseColor"
  35. Width="20"
  36. Height="20"
  37. StrokeThickness="1" Stroke="{StaticResource color.sys.layout.divider}"
  38. Fill="{Binding Color}" />
  39. </Border>
  40. </DataTemplate>
  41. <DataTemplate x:Key="ListAuthorData">
  42. <TextBlock
  43. Name="TxbAuthor"
  44. Margin="6,0"
  45. HorizontalAlignment="Center"
  46. VerticalAlignment="Center"
  47. FontSize="12"
  48. Text="{Binding Name}" />
  49. </DataTemplate>
  50. <Style x:Key="ListColorItemStyle" TargetType="{x:Type ListBoxItem}">
  51. <Setter Property="HorizontalAlignment" Value="Center" />
  52. <Setter Property="Height" Value="40" />
  53. <Setter Property="Width" Value="40" />
  54. <Setter Property="Margin" Value="4" />
  55. <!--<EventSetter Event="PreviewMouseRightButtonDown" Handler="listboxItem_PreviewMouseRightButtonDown" />-->
  56. <Setter Property="Template">
  57. <Setter.Value>
  58. <ControlTemplate TargetType="{x:Type ContentControl}">
  59. <Border
  60. x:Name="border"
  61. Width="40"
  62. Height="40"
  63. HorizontalAlignment="Center"
  64. Background="{TemplateBinding Background}"
  65. CornerRadius="4">
  66. <ContentPresenter />
  67. </Border>
  68. </ControlTemplate>
  69. </Setter.Value>
  70. </Setter>
  71. <Style.Triggers>
  72. <Trigger Property="IsMouseOver" Value="True">
  73. <Setter Property="Background" Value="#e2e3e5" />
  74. </Trigger>
  75. <Trigger Property="IsMouseOver" Value="False">
  76. <Setter Property="Background" Value="Transparent" />
  77. </Trigger>
  78. <Trigger Property="IsSelected" Value="True">
  79. <Setter Property="Background" Value="#e2e3e5" />
  80. </Trigger>
  81. </Style.Triggers>
  82. </Style>
  83. <Style x:Key="ListboxItemStyle1" TargetType="{x:Type ListBoxItem}">
  84. <Setter Property="HorizontalAlignment" Value="Center" />
  85. <Setter Property="Height" Value="40" />
  86. <Setter Property="Margin" Value="4" />
  87. <!--<EventSetter Event="PreviewMouseRightButtonDown" Handler="listboxItem_PreviewMouseRightButtonDown" />-->
  88. <Setter Property="Template">
  89. <Setter.Value>
  90. <ControlTemplate TargetType="{x:Type ContentControl}">
  91. <Border
  92. x:Name="border"
  93. Height="40"
  94. HorizontalAlignment="Center"
  95. VerticalAlignment="Center"
  96. Background="{TemplateBinding Background}"
  97. CornerRadius="4">
  98. <ContentPresenter />
  99. </Border>
  100. </ControlTemplate>
  101. </Setter.Value>
  102. </Setter>
  103. <Style.Triggers>
  104. <Trigger Property="IsMouseOver" Value="True">
  105. <Setter Property="Background" Value="#e2e3e5" />
  106. </Trigger>
  107. <Trigger Property="IsMouseOver" Value="False">
  108. <Setter Property="Background" Value="Transparent" />
  109. </Trigger>
  110. <Trigger Property="IsSelected" Value="True">
  111. <Setter Property="Background" Value="#e2e3e5" />
  112. </Trigger>
  113. </Style.Triggers>
  114. </Style>
  115. <Style x:Key="FocusVisual">
  116. <Setter Property="Control.Template">
  117. <Setter.Value>
  118. <ControlTemplate>
  119. <Rectangle
  120. Margin="2"
  121. SnapsToDevicePixels="true"
  122. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  123. StrokeDashArray="1 2"
  124. StrokeThickness="1" />
  125. </ControlTemplate>
  126. </Setter.Value>
  127. </Setter>
  128. </Style>
  129. <SolidColorBrush x:Key="Button.Static.Background" Color="Transparent" />
  130. <SolidColorBrush x:Key="Button.Static.Border" Color="Transparent" />
  131. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="Transparent" />
  132. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="Transparent" />
  133. <SolidColorBrush x:Key="Button.Pressed.Background" Color="Transparent" />
  134. <SolidColorBrush x:Key="Button.Pressed.Border" Color="Transparent" />
  135. <SolidColorBrush x:Key="Button.Disabled.Background" Color="Transparent" />
  136. <SolidColorBrush x:Key="Button.Disabled.Border" Color="Transparent" />
  137. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="Transparent" />
  138. <Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
  139. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  140. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  141. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  142. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  143. <Setter Property="BorderThickness" Value="1" />
  144. <Setter Property="HorizontalContentAlignment" Value="Center" />
  145. <Setter Property="VerticalContentAlignment" Value="Center" />
  146. <Setter Property="Padding" Value="1" />
  147. <Setter Property="Template">
  148. <Setter.Value>
  149. <ControlTemplate TargetType="{x:Type Button}">
  150. <Border
  151. x:Name="border"
  152. Background="{TemplateBinding Background}"
  153. BorderBrush="{TemplateBinding BorderBrush}"
  154. BorderThickness="{TemplateBinding BorderThickness}"
  155. SnapsToDevicePixels="true">
  156. <ContentPresenter
  157. x:Name="contentPresenter"
  158. Margin="{TemplateBinding Padding}"
  159. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  160. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  161. Focusable="False"
  162. RecognizesAccessKey="True"
  163. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  164. </Border>
  165. <ControlTemplate.Triggers>
  166. <Trigger Property="IsDefaulted" Value="true">
  167. <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
  168. </Trigger>
  169. <Trigger Property="IsMouseOver" Value="true">
  170. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  171. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  172. </Trigger>
  173. <Trigger Property="IsPressed" Value="true">
  174. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  175. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  176. </Trigger>
  177. <Trigger Property="IsEnabled" Value="false">
  178. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  179. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  180. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  181. </Trigger>
  182. </ControlTemplate.Triggers>
  183. </ControlTemplate>
  184. </Setter.Value>
  185. </Setter>
  186. </Style>
  187. </ResourceDictionary>
  188. </UserControl.Resources>
  189. <customControl:DialogContent Header="{Binding Title}">
  190. <customControl:DialogContent.Content>
  191. <Grid>
  192. <Grid.RowDefinitions>
  193. <RowDefinition Height="30" />
  194. <RowDefinition MinHeight="50" />
  195. <RowDefinition Height="30" />
  196. <RowDefinition MinHeight="50" />
  197. <RowDefinition Height="30" />
  198. <RowDefinition />
  199. </Grid.RowDefinitions>
  200. <TextBlock
  201. Grid.Row="0"
  202. Margin="20,0"
  203. FontSize="14"
  204. FontWeight="Bold"
  205. Text="{Binding T_Style}" />
  206. <TextBlock
  207. Grid.Row="2"
  208. Margin="20,0"
  209. FontSize="14"
  210. FontWeight="Bold"
  211. Text="{Binding T_Color}" />
  212. <TextBlock
  213. Grid.Row="4"
  214. Margin="20,0"
  215. FontSize="14"
  216. FontWeight="Bold"
  217. Text="{Binding T_Author}" />
  218. <WrapPanel
  219. Name="WrapPanelIco"
  220. Grid.Row="1"
  221. Margin="15,0">
  222. <!-- 高亮字体 -->
  223. <customControl:CustomIconToggleBtn
  224. x:Name="BtnHighlight"
  225. HorizontalAlignment="Left"
  226. VerticalAlignment="Top"
  227. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  228. Tag="Highlight"
  229. Visibility="{Binding HighlightVisibility}">
  230. <Grid>
  231. <Path
  232. Name="PathHighlight"
  233. VerticalAlignment="Bottom"
  234. Data="M2.5 2H15.5C15.7761 2 16 2.22386 16 2.5V15.5C16 15.7761 15.7761 16 15.5 16H2.5C2.22386 16 2 15.7761 2 15.5V2.5C2 2.22386 2.22386 2 2.5 2ZM0 2.5C0 1.11929 1.11929 0 2.5 0H15.5C16.8807 0 18 1.11929 18 2.5V15.5C18 16.8807 16.8807 18 15.5 18H2.5C1.11929 18 0 16.8807 0 15.5V2.5ZM7.1015 12.75H4.84564L7.68744 4.29492H10.3183L13.1601 12.75H10.9042L10.3828 10.8926H7.62299L7.1015 12.75ZM9.05853 6.15821H8.9472L8.05658 9.34571H9.94916L9.05853 6.15821Z"
  235. Fill="{StaticResource path.fill}" />
  236. </Grid>
  237. </customControl:CustomIconToggleBtn>
  238. <!-- 手绘 -->
  239. <customControl:CustomIconToggleBtn
  240. x:Name="BtnFreeHand"
  241. HorizontalAlignment="Left"
  242. VerticalAlignment="Top"
  243. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  244. Tag="FreeHand"
  245. Visibility="{Binding FreeHandVisibility}">
  246. <Grid>
  247. <Image
  248. Width="18"
  249. Height="18"
  250. Source="pack://application:,,,/Resources/BOTA/Annotation/FreeHande.png"
  251. Stretch="UniformToFill" />
  252. <Path
  253. x:Name="PathFreehand"
  254. VerticalAlignment="Bottom"
  255. Data="M2.57674716,4.1756938 L2,2.77872077 L3.23629157,2.32666213 L4.39858152,1.91423694 L5.48803594,1.54159101 L6.17445055,1.31533198 L6.8293576,1.10686063 L7.4531026,0.916220157 L8.04603105,0.743453759 L8.60848847,0.58860464 L9.14082038,0.451716002 L9.64337227,0.332831046 C9.72466845,0.314519594 9.80473819,0.296960095 9.88358869,0.280153449 L10.3421184,0.188355018 L10.7717319,0.114668273 C12.0867553,-0.0899506488 12.9720275,-0.0214898126 13.4769206,0.326224086 C13.7931843,0.544031104 14.0243062,0.794201523 14.1654835,1.08081708 C14.4150998,1.58758343 14.372095,1.98890858 14.1388295,2.56637317 L14.0118481,2.8607497 L14.1178229,2.85487846 C14.3317937,2.83763034 14.6024395,2.79427307 14.9260381,2.72394503 L15.1265218,2.67850482 L15.3515733,2.6235355 L15.8394138,2.49284637 C15.9249062,2.46876007 16.0124891,2.44352166 16.1021588,2.41713154 L16.665189,2.24497377 L17.2781263,2.04519508 L17.9407955,1.81781534 L18.653021,1.56285442 L19.4146274,1.28033219 L20,2.67408238 L18.9461796,3.06389046 L18.2946269,3.29587476 L17.6827717,3.50537002 L17.1096728,3.69222298 C16.9249947,3.75071655 16.7466192,3.80541085 16.5743893,3.85628035 L16.07598,3.99738887 C15.9158848,4.0405832 15.7617783,4.07992718 15.6135039,4.11539526 L15.1860199,4.21014624 C14.0234985,4.44551743 13.271008,4.39900906 12.8322254,4.05493276 C12.4563321,3.76017178 12.3000774,3.35823485 12.3526752,2.92564423 C12.3673344,2.80507968 12.3854738,2.71608905 12.4219387,2.60716366 L12.4922357,2.42238589 L12.6817642,1.97507903 L12.7254854,1.84483042 C12.7439032,1.77588453 12.7424284,1.73934924 12.7304594,1.71505002 C12.7102358,1.67399262 12.6563117,1.61562419 12.5457193,1.53946054 C12.4359989,1.46389742 12.2053386,1.43735078 11.8597168,1.46056818 L11.6123366,1.4834271 C11.5682899,1.48846839 11.5228403,1.49412611 11.4759961,1.50040128 L11.1782601,1.54546983 L10.8474456,1.60540634 L10.4839463,1.68026003 L10.0881558,1.77008011 C10.0195217,1.78630005 9.9495585,1.80314565 9.87827444,1.82061792 L9.43478535,1.93297989 L8.95998926,2.0604313 L8.4542798,2.20302138 L7.6386142,2.44539918 L6.75560787,2.72211586 L5.8065894,3.03333754 L4.7928874,3.37923034 L4.08180686,3.62916931 L3.34296223,3.89464073 L2.57674716,4.1756938 Z"
  256. Fill="{StaticResource path.fill}" />
  257. <!--<Path
  258. Name="PathFreehand1"
  259. Data="M14.4314 1.33367L17.525 4.42726C17.6226 4.52489 17.6226 4.68318 17.525 4.78081L6.09239 16.2134C6.05159 16.2542 5.99795 16.2797 5.94054 16.2854L2.50234 16.63C2.34512 16.6458 2.21289 16.5136 2.22865 16.3563L2.57326 12.9181C2.57902 12.8607 2.60445 12.8071 2.64524 12.7663L14.0779 1.33367C14.1755 1.23603 14.3338 1.23604 14.4314 1.33367Z"
  260. Fill="#273C62" />
  261. <Path
  262. Name="PathFreehand"
  263. Data="M10.5429 5.70712L13.4892 8.6534L14.9034 7.23919L11.9571 4.29291L10.5429 5.70712ZM10.795 18.69C11.1451 18.2313 11.8261 17.4576 12.6161 16.8098C13.3245 16.2288 13.9749 15.8707 14.4784 15.7756C14.4967 15.814 14.5166 15.858 14.5393 15.9092C14.5507 15.9348 14.563 15.963 14.5763 15.9935C14.6508 16.1639 14.755 16.4026 14.879 16.6183C15.0301 16.8812 15.2623 17.2081 15.6318 17.4462C16.2538 17.847 16.9274 17.9915 17.6045 17.8033C18.2245 17.6311 18.7055 17.2165 19.0713 16.8166L17.5954 15.4668C17.3282 15.759 17.157 15.8519 17.069 15.8764C17.0357 15.8856 17.0068 15.8876 16.968 15.8803C16.9246 15.8721 16.8423 15.8468 16.7165 15.7659C16.7165 15.7659 16.7164 15.7658 16.7162 15.7657C16.7124 15.7623 16.6757 15.7307 16.613 15.6216C16.5484 15.5093 16.4957 15.3894 16.421 15.2194L16.3677 15.0985C16.2826 14.9067 16.1448 14.5984 15.9355 14.3421C15.6958 14.0487 15.3006 13.75 14.7335 13.75C13.462 13.75 12.2363 14.5347 11.3479 15.2632C10.4145 16.0286 9.62868 16.9216 9.20508 17.4767L10.795 18.69Z"
  264. Fill="#94989C" />-->
  265. </Grid>
  266. </customControl:CustomIconToggleBtn>
  267. <!-- 波浪线 -->
  268. <Grid
  269. Name="AnnotSquiggly"
  270. Height="20"
  271. Visibility="Collapsed">
  272. <Image
  273. Width="18"
  274. Height="18"
  275. Source="pack://application:,,,/Resources/BOTA/Annotation/Highlight.png"
  276. Stretch="UniformToFill" />
  277. <Path
  278. Name="AnnotSquigglycolor"
  279. VerticalAlignment="Bottom"
  280. Data="M0,1.5 L1.12734157,0.82359506 C1.95251203,0.32849278 2.99856537,0.398852295 3.75,1 C4.48079387,1.5846351 5.51920613,1.5846351 6.25,1 C6.98079387,0.415364901 8.01920613,0.415364901 8.75,1 C9.48079387,1.5846351 10.5192061,1.5846351 11.25,1 C11.9807939,0.415364901 13.0192061,0.415364901 13.75,1 C14.4807939,1.5846351 15.5192061,1.5846351 16.25,1 C17.0014346,0.398852295 18.047488,0.32849278 18.8726584,0.82359506 L20,1.5 L20,1.5 L20,3 L18.8726584,2.32359506 C18.047488,1.82849278 17.0014346,1.89885229 16.25,2.5 C15.5192061,3.0846351 14.4807939,3.0846351 13.75,2.5 C13.0192061,1.9153649 11.9807939,1.9153649 11.25,2.5 C10.5192061,3.0846351 9.48079387,3.0846351 8.75,2.5 C8.01920613,1.9153649 6.98079387,1.9153649 6.25,2.5 C5.51920613,3.0846351 4.48079387,3.0846351 3.75,2.5 C2.99856537,1.89885229 1.95251203,1.82849278 1.12734157,2.32359506 L0,3 L0,3 L0,1.5 Z"
  281. Fill="Black" />
  282. </Grid>
  283. <!-- 便签 -->
  284. <customControl:CustomIconToggleBtn
  285. x:Name="BtnAnnotSticky"
  286. HorizontalAlignment="Left"
  287. VerticalAlignment="Top"
  288. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  289. Tag="AnnotSticky"
  290. Visibility="{Binding AnnotStickyVisibility}">
  291. <Path
  292. Name="PathSticky"
  293. Width="18"
  294. Height="18"
  295. Data="M18,3 L18,15 L10,15 L5,18 L5,15 L2,15 L2,3 L18,3 Z M15,9.5 L5,9.5 L5,11 L15,11 L15,9.5 Z M11,6 L5,6 L5,7.5 L11,7.5 L11,6 Z"
  296. Fill="{StaticResource path.fill}" />
  297. </customControl:CustomIconToggleBtn>
  298. <!-- 图章 -->
  299. <customControl:CustomIconToggleBtn
  300. x:Name="BtnAnnotStamp"
  301. HorizontalAlignment="Left"
  302. VerticalAlignment="Top"
  303. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  304. Tag="AnnotStamp"
  305. Visibility="{Binding AnnotStampVisibility}">
  306. <Path
  307. Name="PathStamp"
  308. Width="18"
  309. Height="18"
  310. Data="M14.4,12.8 L14.4,14 L1.6,14 L1.6,12.8 L14.4,12.8 Z M14.4,10 L14.4,11.2 L1.6,11.2 L1.6,10 L14.4,10 Z M8,2 C9.7673112,2 11.2,3.4326888 11.2,5.2 C11.2,6.3887762 10.5517747,7.42615125 9.58951117,7.97793796 L9.6,7.96 C9.33333333,8.32 9.2,8.66666667 9.2,9 C9.2,9.33333333 9.33333333,9.66666667 9.6,10 L6.4,10 C6.66666667,9.66666667 6.8,9.33333333 6.8,9 C6.8,8.67223253 6.67108218,8.33157328 6.41324655,7.97802224 C5.44867449,7.42686988 4.8,6.38918796 4.8,5.2 C4.8,3.4326888 6.2326888,2 8,2 Z"
  311. Fill="{StaticResource path.fill}" />
  312. </customControl:CustomIconToggleBtn>
  313. <!-- 线 -->
  314. <customControl:CustomIconToggleBtn
  315. x:Name="BtnSharpLine"
  316. HorizontalAlignment="Left"
  317. VerticalAlignment="Top"
  318. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  319. Tag="SharpLine"
  320. Visibility="{Binding SharpLineVisibility}">
  321. <Path
  322. x:Name="PathSharpLine"
  323. Width="20"
  324. Height="20"
  325. Fill="{StaticResource path.fill}">
  326. <Path.Data>
  327. M17.7072 1.70718L1.70718 17.7072L0.292969 16.293L16.293 0.292969L17.7072 1.70718Z
  328. </Path.Data>
  329. </Path>
  330. </customControl:CustomIconToggleBtn>
  331. <!-- 箭头 -->
  332. <customControl:CustomIconToggleBtn
  333. x:Name="BtnSharpArrow"
  334. HorizontalAlignment="Left"
  335. VerticalAlignment="Top"
  336. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  337. Tag="SharpArrow"
  338. Visibility="{Binding SharpArrowVisibility}">
  339. <Path
  340. x:Name="PathArrow"
  341. Width="20"
  342. Height="20"
  343. Fill="{StaticResource path.fill}">
  344. <Path.Data>
  345. M13.5859 2H9.00008V0H16.0001H17.0001V1V8H15.0001V3.41421L1.70718 16.7071L0.292969 15.2929L13.5859 2Z
  346. </Path.Data>
  347. </Path>
  348. </customControl:CustomIconToggleBtn>
  349. <!-- 圆 -->
  350. <customControl:CustomIconToggleBtn
  351. x:Name="BtnAnnotCircle"
  352. HorizontalAlignment="Left"
  353. VerticalAlignment="Top"
  354. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  355. Tag="AnnotCircle"
  356. Visibility="{Binding AnnotCircleVisibility}">
  357. <Path
  358. x:Name="PathCircle"
  359. Width="20"
  360. Height="20"
  361. Fill="{StaticResource path.fill}">
  362. <Path.Data>
  363. M9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16ZM9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18Z
  364. </Path.Data>
  365. </Path>
  366. <!--<Ellipse
  367. x:Name="EllipseCircle"
  368. Width="20"
  369. Height="20"
  370. Stroke="{StaticResource path.fill}"
  371. StrokeThickness="2" />-->
  372. </customControl:CustomIconToggleBtn>
  373. <!-- 形状-矩形 -->
  374. <customControl:CustomIconToggleBtn
  375. x:Name="BtnAnnotSquare"
  376. HorizontalAlignment="Left"
  377. VerticalAlignment="Top"
  378. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  379. Tag="AnnotSquare"
  380. Visibility="{Binding AnnotSquareVisibility}">
  381. <!--<Path Name="RectAnnotSquare" Fill="{StaticResource path.fill}" Data="M18.75,3.25 L1.25,3.25 L1.25,16.75 L18.75,16.75 L18.75,3.25 Z M17.25,4.75 L17.25,15.25 L2.75,15.25 L2.75,4.75 L17.25,4.75 Z" />-->
  382. <Rectangle
  383. x:Name="RectAnnotSquare"
  384. Width="20"
  385. Height="18"
  386. HorizontalAlignment="Center"
  387. VerticalAlignment="Center"
  388. Stroke="{StaticResource path.fill}"
  389. StrokeThickness="2" />
  390. </customControl:CustomIconToggleBtn>
  391. <!-- 文本注释 -->
  392. <customControl:CustomIconToggleBtn
  393. x:Name="BtnAnnotFreeText"
  394. HorizontalAlignment="Left"
  395. VerticalAlignment="Top"
  396. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  397. Tag="AnnotFreeText"
  398. Visibility="{Binding AnnotFreeTextVisibility}">
  399. <Path
  400. Name="FreeTextPath"
  401. Data="M0 1C0 0.447715 0.447715 0 1 0H7H9H15C15.5523 0 16 0.447715 16 1V5H14V2H9L9 14H11V16H9H7H5V14H7L7 2H2V5H0V1Z"
  402. Fill="{StaticResource path.fill}" />
  403. </customControl:CustomIconToggleBtn>
  404. <!-- 删除线 -->
  405. <customControl:CustomIconToggleBtn
  406. x:Name="BtnAnnotStrikeout"
  407. HorizontalAlignment="Left"
  408. VerticalAlignment="Top"
  409. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  410. Tag="AnnotStrikeout"
  411. Visibility="{Binding AnnotStrikeoutVisibility}">
  412. <Grid Width="20" Height="20">
  413. <Path
  414. Name="StrikeoutPath"
  415. Data="M5.23047 18H2.47656L4.46236 12.5H15.5376L17.5234 18H14.7578L13.2344 13.4297H6.76562L5.23047 18ZM14.9359 10.8333L11.418 1.08984H8.58203L5.06411 10.8333H7.63134L9.89453 4.05469H10.0938L12.3679 10.8333H14.9359Z"
  416. Fill="{StaticResource path.fill}" />
  417. <Rectangle
  418. x:Name="PathStrikeoutyColor"
  419. Width="18"
  420. Height="2"
  421. Margin="0,5,0,0"
  422. Fill="#94989C"
  423. Opacity="1" />
  424. </Grid>
  425. </customControl:CustomIconToggleBtn>
  426. <!-- 下划线 -->
  427. <customControl:CustomIconToggleBtn
  428. x:Name="BtnUnderLine"
  429. HorizontalAlignment="Left"
  430. VerticalAlignment="Top"
  431. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  432. Tag="Underline"
  433. Visibility="{Binding UnderLineVisibility}">
  434. <Grid Width="20" Height="20">
  435. <Grid.RowDefinitions>
  436. <RowDefinition Height="Auto" />
  437. <RowDefinition />
  438. </Grid.RowDefinitions>
  439. <Path Data="M3.41699 16H5.82666L7.16992 12.001H12.8301L14.1631 16H16.583L11.2407 1.20361H8.75928L3.41699 16ZM9.90771 3.79785H10.082L12.2148 10.1553H7.78516L9.90771 3.79785Z" Fill="{StaticResource path.fill}" />
  440. <Rectangle
  441. Name="RectangleUnderline"
  442. Grid.Row="1"
  443. Width="16"
  444. Height="2"
  445. Margin="0,1,0,0"
  446. Fill="#94989C"
  447. Opacity="1" />
  448. </Grid>
  449. </customControl:CustomIconToggleBtn>
  450. <!-- 链接 -->
  451. <customControl:CustomIconToggleBtn
  452. x:Name="BtnAnnotLink"
  453. HorizontalAlignment="Left"
  454. VerticalAlignment="Top"
  455. Style="{StaticResource ToggleBtnScreenAnnotationStyle}"
  456. Tag="AnnotLink"
  457. Visibility="{Binding AnnotLinkVisible}">
  458. <Grid Width="20" Height="20">
  459. <Path Data="M10.1962 13.7315L7.74126 16.1865C6.65663 17.2712 4.8981 17.2712 3.81347 16.1865C2.72884 15.1019 2.72884 13.3434 3.81347 12.2587L6.26846 9.80376L4.85424 8.38954L2.39926 10.8445C0.53358 12.7102 0.533581 15.7351 2.39926 17.6007C4.26494 19.4664 7.2898 19.4664 9.15547 17.6007L11.6105 15.1458L10.1962 13.7315ZM13.7318 10.196L15.146 11.6102L17.6007 9.15547C19.4664 7.2898 19.4664 4.26494 17.6007 2.39926C15.7351 0.533581 12.7102 0.53358 10.8445 2.39926L8.38978 4.85401L9.80399 6.26822L12.2587 3.81347C13.3434 2.72884 15.1019 2.72884 16.1865 3.81347C17.2712 4.8981 17.2712 6.65663 16.1865 7.74126L13.7318 10.196Z" Fill="#273C62" />
  460. <Path Data="M6.29289 12.2925L12.293 6.29286L13.7071 7.70713L7.70705 13.7067L6.29289 12.2925Z" Fill="#94989C" />
  461. </Grid>
  462. </customControl:CustomIconToggleBtn>
  463. </WrapPanel>
  464. <ListBox
  465. x:Name="ListColor"
  466. Grid.Row="3"
  467. Margin="15,0"
  468. Background="Transparent"
  469. BorderThickness="0"
  470. ItemContainerStyle="{StaticResource ListColorItemStyle}"
  471. ItemTemplate="{StaticResource ListColorData}"
  472. ItemsSource="{Binding AnnotationColors}"
  473. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  474. ScrollViewer.VerticalScrollBarVisibility="Auto"
  475. SelectionMode="Multiple">
  476. <ListBox.ItemsPanel>
  477. <ItemsPanelTemplate>
  478. <WrapPanel
  479. IsItemsHost="True"
  480. Orientation="Horizontal"
  481. ScrollViewer.CanContentScroll="True" />
  482. </ItemsPanelTemplate>
  483. </ListBox.ItemsPanel>
  484. </ListBox>
  485. <ListBox
  486. x:Name="ListAuthor"
  487. Grid.Row="5"
  488. Margin="15,0"
  489. Background="Transparent"
  490. BorderThickness="0"
  491. ItemContainerStyle="{StaticResource ListboxItemStyle1}"
  492. ItemTemplate="{StaticResource ListAuthorData}"
  493. ItemsSource="{Binding AnnotationAuthor}"
  494. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  495. ScrollViewer.VerticalScrollBarVisibility="Auto"
  496. SelectionMode="Multiple">
  497. <ListBox.ItemsPanel>
  498. <ItemsPanelTemplate>
  499. <WrapPanel
  500. IsItemsHost="True"
  501. Orientation="Horizontal"
  502. ScrollViewer.CanContentScroll="True" />
  503. </ItemsPanelTemplate>
  504. </ListBox.ItemsPanel>
  505. </ListBox>
  506. </Grid>
  507. </customControl:DialogContent.Content>
  508. <customControl:DialogContent.BottmBar>
  509. <Grid>
  510. <Grid.ColumnDefinitions>
  511. <ColumnDefinition Width="40*" />
  512. <ColumnDefinition Width="60*" />
  513. </Grid.ColumnDefinitions>
  514. <Button
  515. Name="BtnClean"
  516. Width="80"
  517. Height="32"
  518. Margin="25,0,0,0"
  519. HorizontalAlignment="Left"
  520. Background="Transparent"
  521. BorderBrush="Transparent"
  522. Command="{Binding CleanCommand}"
  523. Content="{Binding T_Clear}"
  524. FontFamily="Segoe UI"
  525. FontSize="14"
  526. Foreground=" #1770F4"
  527. Style="{StaticResource btn.link}" />
  528. <StackPanel Grid.Column="1" Orientation="Horizontal">
  529. <Button
  530. Width="80"
  531. Height="32"
  532. Margin="20,0,0,0"
  533. HorizontalAlignment="Left"
  534. Command="{Binding OkCommnad}"
  535. Content="{Binding T_Apply}"
  536. FontFamily="Segoe UI"
  537. FontSize="14"
  538. Style="{StaticResource Btn.cta}" />
  539. <Button
  540. Width="80"
  541. Height="32"
  542. Margin="30,0,0,0"
  543. HorizontalAlignment="Right"
  544. Command="{Binding CancelCommand}"
  545. Content="{Binding T_Cancel}"
  546. FontFamily="Segoe UI"
  547. FontSize="14"
  548. Style="{StaticResource btn.sec}" />
  549. </StackPanel>
  550. </Grid>
  551. </customControl:DialogContent.BottmBar>
  552. </customControl:DialogContent>
  553. <i:Interaction.Triggers>
  554. <i:EventTrigger EventName="Loaded">
  555. <helper:AdvancedInvokeCommandAction Command="{Binding LoadedCommand}" PassEventArgsToCommand="True">
  556. <helper:AdvancedInvokeCommandAction.CommandParameter>
  557. <MultiBinding Converter="{StaticResource ResourceKey=ObjectConvert}" Mode="TwoWay">
  558. <MultiBinding.Bindings>
  559. <Binding ElementName="BtnHighlight" />
  560. <Binding ElementName="BtnFreeHand" />
  561. <Binding ElementName="BtnAnnotSticky" />
  562. <Binding ElementName="BtnAnnotStamp" />
  563. <Binding ElementName="BtnSharpLine" />
  564. <Binding ElementName="BtnSharpArrow" />
  565. <Binding ElementName="BtnAnnotCircle" />
  566. <Binding ElementName="BtnAnnotSquare" />
  567. <Binding ElementName="BtnAnnotFreeText" />
  568. <Binding ElementName="BtnAnnotStrikeout" />
  569. <Binding ElementName="BtnUnderLine" />
  570. <Binding ElementName="BtnAnnotLink" />
  571. <Binding ElementName="ListColor" />
  572. <Binding ElementName="ListAuthor" />
  573. </MultiBinding.Bindings>
  574. </MultiBinding>
  575. </helper:AdvancedInvokeCommandAction.CommandParameter>
  576. </helper:AdvancedInvokeCommandAction>
  577. </i:EventTrigger>
  578. </i:Interaction.Triggers>
  579. </UserControl>