AnnotToolContent.xaml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <UserControl
  2. x:Class="PDF_Master.Views.Tools.AnnotToolContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
  6. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  7. xmlns:customControl="clr-namespace:PDF_Master.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_Master.Views.Tools"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:prism="http://prismlibrary.com/"
  13. xmlns:viewmodels="clr-namespace:PDF_Master.ViewModels.Tools"
  14. d:DataContext="{d:DesignInstance Type=viewmodels:AnnotToolContentViewModel}"
  15. d:DesignHeight="450"
  16. d:DesignWidth="800"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. Loaded="UserControl_Loaded"
  19. mc:Ignorable="d">
  20. <UserControl.Resources>
  21. <ResourceDictionary>
  22. <ResourceDictionary.MergedDictionaries>
  23. <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml" />
  24. </ResourceDictionary.MergedDictionaries>
  25. <local:AnnotToolIsCheckedConvert x:Key="AnnotToolIsCheckedConvert" />
  26. </ResourceDictionary>
  27. </UserControl.Resources>
  28. <Grid>
  29. <Border
  30. x:Name="ToolsBorder"
  31. Height="40"
  32. Background="{StaticResource color.sys.layout.mg}"
  33. BorderBrush="{StaticResource color.sys.layout.divider}"
  34. BorderThickness="0,1,0,1">
  35. <WrapPanel
  36. Name="ToolPanel"
  37. Grid.ColumnSpan="2"
  38. Height="40"
  39. Margin="11,0,11,-1.6"
  40. HorizontalAlignment="Center">
  41. <customControl:CustomIconToggleBtn
  42. x:Name="BtnHand"
  43. Command="{Binding HandCommand}"
  44. Foreground="Black"
  45. IsChecked="{Binding BtnHandIsChecked}"
  46. Style="{StaticResource ToggleBtnViewModeStyle}"
  47. Tag="Hand">
  48. <Path Data="M8.65675004,8.16487294 L8.31929176,3.08955344 C8.27484516,2.45067706 8.73605124,1.88916808 9.3672872,1.81364041 L9.42727978,1.80702946 C9.7375259,1.77231122 10.048341,1.86719397 10.2872855,2.06956407 C10.52623,2.27193417 10.6724298,2.56411249 10.6918109,2.87800309 L11.0592655,8.41136687 C11.0703604,8.56777914 11.1890067,8.69481191 11.3432929,8.71547049 C11.4117069,8.72451809 11.4807634,8.70437729 11.5338005,8.65990771 C11.5868376,8.61543812 11.6190384,8.55067845 11.6226334,8.48125404 L11.8869757,3.38137959 C11.9198227,2.72140464 12.4766895,2.21274431 13.1318218,2.24429647 L13.1402582,2.24429647 C13.7959421,2.28184343 14.297592,2.84726687 14.2613696,3.50793203 L13.9876535,8.77969113 C13.9789526,8.94299187 14.0966479,9.08545115 14.2576201,9.10646087 C14.4169754,9.12723813 14.5669569,9.02051854 14.5978905,8.86091136 L15.1434481,6.11075684 C15.2690576,5.45910622 15.8896058,5.03411668 16.5307766,5.1597247 L16.5401504,5.16161354 C17.1847354,5.29129021 17.6038557,5.92173435 17.4775345,6.57163438 L16.8232404,9.87521972 C16.2345632,13.9579525 15.4199764,16.2698956 14.7085019,17.2549269 C13.6052008,18.7830004 11.6685652,18.8 10.1340674,18.8 C8.60050699,18.8 6.95727264,18.4382867 6.19424198,17.8706895 C5.43027393,17.3030924 4.39727664,16.0045133 3.74110776,14.5850482 L3.7504816,14.5803261 C3.69866814,14.5113251 3.65435718,14.4369191 3.61831044,14.3583871 L2.61249729,12.1767742 C2.33448107,11.5760307 2.58933313,10.86181 3.18336421,10.5769247 L3.19273805,10.5722026 C3.47751589,10.4385054 3.80345194,10.4247302 4.09834296,10.5339286 C4.39323397,10.643127 4.63273624,10.8662846 4.76379382,11.153966 C5.30935138,12.3250483 5.65243396,12.8614795 5.79491635,12.7632597 C6.00770254,12.61593 5.84366032,12.2117178 5.55869555,9.52767272 C5.36691233,7.72541424 5.12842292,5.92851198 4.84347147,4.13880539 C4.72485796,3.51086239 5.11430225,2.89908368 5.73023684,2.74578413 L5.79491635,2.72972897 C6.09856283,2.65668014 6.41866346,2.71262661 6.68014755,2.8844477 C6.94163163,3.05626878 7.1214958,3.32884896 7.17755791,3.63826215 L8.03713914,8.25364853 C8.06759678,8.41727678 8.22031992,8.52789659 8.38397126,8.50486457 C8.54887264,8.48104209 8.66774595,8.33328989 8.65675004,8.16581736 L8.65675004,8.16487294 Z" Fill="{StaticResource color.icon.base.brand}" />
  49. </customControl:CustomIconToggleBtn>
  50. <customControl:CustomIconToggleBtn
  51. x:Name="BtnMagnify"
  52. Click="BtnHand_Click"
  53. Foreground="Black"
  54. Style="{StaticResource ToggleBtnViewModeStyle}"
  55. Tag="Magnify"
  56. Visibility="Collapsed">
  57. <Grid>
  58. <Path Data="M8.40662 17.4196V18.6667H6.40466V17.446H6.26632C5.77804 18.3086 4.83402 18.8132 3.66215 18.8132C1.96944 18.8132 0.740601 17.7715 0.740601 16.152V16.1357C0.740601 14.5785 1.90831 13.656 3.99762 13.499C4.24134 13.9553 4.52548 14.3868 4.84525 14.7886L4.40271 14.8174C3.27152 14.8906 2.74255 15.3057 2.74255 16.0381V16.0544C2.74255 16.8112 3.38546 17.2588 4.28064 17.2588C5.18242 17.2588 5.91099 16.8236 6.23013 16.1696C6.88447 16.6873 7.6168 17.1108 8.40662 17.4196ZM3.28308 11.6834C3.13105 11.1098 3.0375 10.5123 3.00919 9.89783C1.91889 10.2983 1.22247 11.0796 1.09054 12.0912L1.0824 12.1644H2.99483L3.00297 12.1318C3.06265 11.96 3.15663 11.8098 3.28308 11.6834Z" Fill="#94989C" />
  59. <Path Data="M5.26416 17.2012C7.02197 17.2012 8.41357 16.4443 9.19482 15.1016H9.40234V16.9814H12.0269V7.91162C12.0269 5.12842 10.147 3.46826 6.81445 3.46826C3.79932 3.46826 1.71191 4.9209 1.39453 7.09375L1.38232 7.1792H3.93359L3.9458 7.13037C4.26318 6.19043 5.22754 5.65332 6.69238 5.65332C8.48682 5.65332 9.40234 6.45898 9.40234 7.91162V9.0835L5.81348 9.29102C2.65186 9.48633 0.869629 10.8657 0.869629 13.2339V13.2583C0.869629 15.6631 2.7373 17.2012 5.26416 17.2012ZM3.50635 13.1484V13.124C3.50635 11.9277 4.33643 11.2686 6.16748 11.1587L9.40234 10.9512V12.0864C9.40234 13.7954 7.94971 15.0894 5.97217 15.0894C4.54395 15.0894 3.50635 14.3691 3.50635 13.1484Z" Fill="{StaticResource color.icon.base.brand}" />
  60. <Ellipse
  61. Width="17"
  62. Height="17"
  63. Stroke="#273C62"
  64. StrokeThickness="2" />
  65. </Grid>
  66. </customControl:CustomIconToggleBtn>
  67. <customControl:CustomIconToggleBtn
  68. x:Name="BtnSelecttool"
  69. Click="BtnTool_Click"
  70. Command="{Binding MyToolsCommand}"
  71. CommandParameter="{Binding ElementName=BtnSelecttool}"
  72. ContentStringFormat="156"
  73. Foreground="Black"
  74. IsChecked="{Binding BtnSelecttoolIsChecked}"
  75. Style="{StaticResource ToggleBtnViewModeStyle}"
  76. Tag="SnapshotEdit">
  77. <Grid>
  78. <Path Data="M2 4V2H4V4H2ZM0 1C0 0.447715 0.447715 0 1 0H5C5.55228 0 6 0.447715 6 1V5C6 5.55228 5.55228 6 5 6H1C0.447715 6 0 5.55228 0 5V1ZM2 16V14H4V16H2ZM0 13C0 12.4477 0.447715 12 1 12H5C5.55228 12 6 12.4477 6 13V17C6 17.5523 5.55228 18 5 18H1C0.447715 18 0 17.5523 0 17V13ZM14 2V4H16V2H14ZM13 0C12.4477 0 12 0.447715 12 1V5C12 5.55228 12.4477 6 13 6H17C17.5523 6 18 5.55228 18 5V1C18 0.447715 17.5523 0 17 0H13ZM14 16V14H16V16H14ZM12 13C12 12.4477 12.4477 12 13 12H17C17.5523 12 18 12.4477 18 13V17C18 17.5523 17.5523 18 17 18H13C12.4477 18 12 17.5523 12 17V13Z" Fill="{StaticResource color.icon.base.brand}" />
  79. <Path Data="M1 10.8333H0V7.16667H1H2V10.8333H1ZM7.16667 1V0H10.8333V1V2H7.16667V1ZM17 7.16667H18V10.8333H17H16V7.16667H17ZM10.8333 17V18H7.16667V17V16H10.8333V17Z" Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
  80. </Grid>
  81. </customControl:CustomIconToggleBtn>
  82. <customControl:CustomIconToggleBtn
  83. x:Name="Btnzoomarea"
  84. Click="BtnHand_Click"
  85. Foreground="Black"
  86. Style="{StaticResource ToggleBtnViewModeStyle}"
  87. Visibility="Collapsed">
  88. <Grid>
  89. <Path Data="M2.66667 1H4.5V2V3H3V4.5H2H1V2.66667C1 1.74619 1.74619 1 2.66667 1ZM1 17.3333V15.5H2H3V17H4.5V18V19H2.66667C1.74619 19 1 18.2538 1 17.3333ZM2 11.8333H1V8.16667H2H3V11.5V11.8333H2ZM11.5 3H11.8333V2V1H8.16667V2V3H11.5ZM15.5 2V1H17.3333C18.2538 1 19 1.74619 19 2.66667V4.5H18H17V3H15.5V2Z" Fill="#94989C" />
  90. <Path Data="M16 11.5C16 13.9853 13.9853 16 11.5 16C9.01472 16 7 13.9853 7 11.5C7 9.01472 9.01472 7 11.5 7C13.9853 7 16 9.01472 16 11.5ZM15.3347 16.7489C14.2597 17.5356 12.9341 18 11.5 18C7.91015 18 5 15.0899 5 11.5C5 7.91015 7.91015 5 11.5 5C15.0899 5 18 7.91015 18 11.5C18 12.9341 17.5356 14.2597 16.7489 15.3347L19.7071 18.2929L18.2929 19.7071L15.3347 16.7489Z" Fill="#273C62" />
  91. </Grid>
  92. </customControl:CustomIconToggleBtn>
  93. <Separator
  94. Width="1"
  95. Height="16"
  96. Margin="10,0,10,0"
  97. BorderBrush="{StaticResource color.sys.layout.divider}"
  98. BorderThickness="5"
  99. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  100. <customControl:CustomIconToggleBtn
  101. x:Name="BtnHighlight"
  102. Click="BtnTool_Click"
  103. Command="{Binding MyToolsCommand}"
  104. CommandParameter="{Binding ElementName=BtnHighlight}"
  105. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=HighLight}"
  106. Style="{StaticResource ToggleBtnViewModeStyle}"
  107. Tag="HighLight">
  108. <Grid VerticalAlignment="Center">
  109. <Border
  110. x:Name="HighlightPath"
  111. Width="20"
  112. Height="20"
  113. Background="{Binding HighLightColor}"
  114. BorderThickness="1"
  115. CornerRadius="3"
  116. Opacity="{Binding HighLightOpacity}">
  117. <Path
  118. Margin="-5,-5,0,0"
  119. Data="M7.5 7H20.5C20.7761 7 21 7.22386 21 7.5V20.5C21 20.7761 20.7761 21 20.5 21H7.5C7.22386 21 7 20.7761 7 20.5V7.5C7 7.22386 7.22386 7 7.5 7ZM5 7.5C5 6.11929 6.11929 5 7.5 5H20.5C21.8807 5 23 6.11929 23 7.5V20.5C23 21.8807 21.8807 23 20.5 23H7.5C6.11929 23 5 21.8807 5 20.5V7.5ZM12.1015 17.75H9.84564L12.6874 9.29492H15.3183L18.1601 17.75H15.9042L15.3828 15.8926H12.623L12.1015 17.75ZM14.0585 11.1582H13.9472L13.0566 14.3457H14.9492L14.0585 11.1582Z"
  120. Fill="{StaticResource color.icon.base.brand}" />
  121. </Border>
  122. </Grid>
  123. </customControl:CustomIconToggleBtn>
  124. <customControl:CustomIconToggleBtn
  125. x:Name="BtnUnderLine"
  126. Click="BtnTool_Click"
  127. Command="{Binding MyToolsCommand}"
  128. CommandParameter="{Binding ElementName=BtnUnderLine}"
  129. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=UnderLine}"
  130. Style="{StaticResource ToggleBtnViewModeStyle}"
  131. Tag="UnderLine">
  132. <Grid Width="20" Height="20">
  133. <Grid.RowDefinitions>
  134. <RowDefinition Height="Auto" />
  135. <RowDefinition />
  136. </Grid.RowDefinitions>
  137. <Path
  138. Name="UnderlinePath"
  139. 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"
  140. Fill="{StaticResource color.icon.base.brand}" />
  141. <Rectangle
  142. Grid.Row="1"
  143. Width="16"
  144. Height="2"
  145. Margin="0,1,0,0"
  146. Fill="{Binding UnderLineColor}"
  147. Opacity="{Binding UnderLineOpacity}" />
  148. </Grid>
  149. </customControl:CustomIconToggleBtn>
  150. <customControl:CustomIconToggleBtn
  151. x:Name="BtnSuiggly"
  152. Click="BtnTool_Click"
  153. Command="{Binding MyToolsCommand}"
  154. CommandParameter="{Binding ElementName=BtnSuiggly}"
  155. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Squiggly}"
  156. Style="{StaticResource ToggleBtnViewModeStyle}"
  157. Tag="Squiggly"
  158. Visibility="Collapsed">
  159. <Grid Width="20" Height="20">
  160. <Path
  161. Name="SquigglyPath"
  162. VerticalAlignment="Bottom"
  163. 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"
  164. Fill="{Binding SquigglyColor}"
  165. Opacity="{Binding SquigglyOpacity}" />
  166. </Grid>
  167. </customControl:CustomIconToggleBtn>
  168. <customControl:CustomIconToggleBtn
  169. x:Name="BtnDeleteLine"
  170. Click="BtnTool_Click"
  171. Command="{Binding MyToolsCommand}"
  172. CommandParameter="{Binding ElementName=BtnDeleteLine}"
  173. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Strikeout}"
  174. Style="{StaticResource ToggleBtnViewModeStyle}"
  175. Tag="Strikeout">
  176. <Grid Width="20" Height="20">
  177. <Path
  178. Name="StrikeoutPath"
  179. 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"
  180. Fill="{StaticResource color.icon.base.brand}" />
  181. <Rectangle
  182. Grid.Row="1"
  183. Width="16"
  184. Height="2"
  185. Margin="0,4,0,0"
  186. Fill="{Binding StrikeoutColor}"
  187. Opacity="{Binding StrikeoutOpacity}" />
  188. </Grid>
  189. </customControl:CustomIconToggleBtn>
  190. <customControl:CustomIconToggleBtn
  191. x:Name="BtnFreeHand"
  192. Click="BtnTool_Click"
  193. Command="{Binding MyToolsCommand}"
  194. CommandParameter="{Binding ElementName=BtnFreeHand}"
  195. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Freehand}"
  196. Style="{StaticResource ToggleBtnViewModeStyle}"
  197. Tag="Freehand">
  198. <Grid>
  199. <Path
  200. Name="FreehandPath2"
  201. VerticalAlignment="Bottom"
  202. Data="M14.0781 1.33415C14.1757 1.23652 14.334 1.23652 14.4317 1.33415L17.5253 4.42775C17.6229 4.52538 17.6229 4.68367 17.5253 4.7813L6.09263 16.2139C6.05184 16.2547 5.99819 16.2801 5.94079 16.2859L2.50258 16.6305C2.34536 16.6463 2.21314 16.514 2.2289 16.3568L2.57351 12.9186C2.57926 12.8612 2.60469 12.8076 2.64548 12.7668L14.0781 1.33415Z"
  203. Stroke="{StaticResource color.icon.base.brand}"
  204. StrokeDashCap="Round"
  205. StrokeThickness="2" />
  206. <Path
  207. Name="FreehandPath"
  208. VerticalAlignment="Bottom"
  209. Data="M10.5429 5.70718L13.4892 8.65346L14.9034 7.23925L11.9571 4.29297L10.5429 5.70718ZM10.795 18.6901C11.1451 18.2313 11.8261 17.4576 12.6161 16.8098C13.3245 16.2288 13.9749 15.8708 14.4784 15.7757C14.4967 15.8141 14.5166 15.858 14.5393 15.9093C14.5507 15.9348 14.563 15.9631 14.5763 15.9935C14.6508 16.164 14.755 16.4027 14.879 16.6184C15.0301 16.8812 15.2623 17.2082 15.6318 17.4463C16.2538 17.8471 16.9274 17.9916 17.6045 17.8034C18.2245 17.6311 18.7055 17.2166 19.0713 16.8167L17.5954 15.4669C17.3282 15.759 17.157 15.852 17.069 15.8764C17.0357 15.8857 17.0068 15.8876 16.968 15.8803C16.9246 15.8721 16.8423 15.8468 16.7165 15.766C16.7165 15.7659 16.7164 15.7659 16.7162 15.7657C16.7124 15.7624 16.6757 15.7308 16.613 15.6217C16.5484 15.5094 16.4957 15.3894 16.421 15.2195L16.3677 15.0986C16.2826 14.9067 16.1448 14.5984 15.9355 14.3422C15.6958 14.0488 15.3006 13.7501 14.7335 13.7501C13.462 13.7501 12.2363 14.5348 11.3479 15.2633C10.4145 16.0287 9.62868 16.9217 9.20508 17.4767L10.795 18.6901Z"
  210. Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
  211. </Grid>
  212. </customControl:CustomIconToggleBtn>
  213. <customControl:CustomIconToggleBtn
  214. x:Name="BtnTextBox"
  215. Click="BtnTool_Click"
  216. Command="{Binding MyToolsCommand}"
  217. CommandParameter="{Binding ElementName=BtnTextBox}"
  218. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Freetext}"
  219. Style="{StaticResource ToggleBtnViewModeStyle}"
  220. Tag="Freetext">
  221. <Path
  222. Name="FreeTextPath"
  223. Data="M16.75,2.75 L16.75,6 L15.25,6 L15.25,4.25 L10.75,4.25 L10.75,16.25 L12.3333333,16.25 L12.3333333,17.75 L7.66666667,17.75 L7.66666667,16.25 L9.25,16.25 L9.25,4.25 L4.75,4.25 L4.75,6 L3.25,6 L3.25,2.75 L16.75,2.75 Z"
  224. Fill="{StaticResource color.icon.base.brand}" />
  225. </customControl:CustomIconToggleBtn>
  226. <customControl:CustomIconToggleBtn
  227. x:Name="BtnNote"
  228. Click="BtnTool_Click"
  229. Command="{Binding MyToolsCommand}"
  230. CommandParameter="{Binding ElementName=BtnNote}"
  231. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=StickyNote}"
  232. Style="{StaticResource ToggleBtnViewModeStyle}"
  233. Tag="StickyNote">
  234. <Grid Width="20" Height="20">
  235. <Path
  236. Name="StickyPath"
  237. Width="20"
  238. Height="20"
  239. Data="M2.04167 2C1.46637 2 1 2.46637 1 3.04167V14.9583C1 15.5336 1.46637 16 2.04167 16H4.33325V18.1716C4.33325 18.5548 4.73304 18.8068 5.07873 18.6415L10.6039 16H17.9583C18.5336 16 19 15.5336 19 14.9583V3.04167C19 2.46637 18.5336 2 17.9583 2H2.04167Z"
  240. Stretch="Uniform"
  241. Stroke="{StaticResource color.icon.base.brand}"
  242. StrokeThickness="2" />
  243. <Rectangle
  244. Width="10"
  245. Height="2"
  246. Margin="0,0,0,2"
  247. HorizontalAlignment="Center"
  248. VerticalAlignment="Center"
  249. Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
  250. </Grid>
  251. </customControl:CustomIconToggleBtn>
  252. <customControl:CustomIconToggleBtn
  253. x:Name="BtnRectangle"
  254. Click="BtnTool_Click"
  255. Command="{Binding MyToolsCommand}"
  256. CommandParameter="{Binding ElementName=BtnRectangle}"
  257. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Rect}"
  258. Style="{StaticResource ToggleBtnViewModeStyle}"
  259. Tag="Rect">
  260. <Path
  261. Name="RectPath"
  262. Data="M2.25 0C1.00736 0 0 1.00736 0 2.25V10.75C0 11.9926 1.00736 13 2.25 13H5.07089C5.55612 16.3923 8.47353 19 12 19C15.866 19 19 15.866 19 12C19 8.47353 16.3923 5.55612 13 5.07089V2.25C13 1.00736 11.9926 0 10.75 0H2.25ZM11 5.07089V2.25C11 2.11193 10.8881 2 10.75 2H2.25C2.11193 2 2 2.11193 2 2.25V10.75C2 10.8881 2.11193 11 2.25 11H5.07089C5.5094 7.93431 7.93431 5.5094 11 5.07089ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z"
  263. Fill="{StaticResource color.icon.base.brand}" />
  264. </customControl:CustomIconToggleBtn>
  265. <customControl:CustomIconToggleBtn
  266. x:Name="BtnCircle"
  267. Click="BtnTool_Click"
  268. Command="{Binding MyToolsCommand}"
  269. CommandParameter="{Binding ElementName=BtnCircle}"
  270. Style="{StaticResource ToggleBtnViewModeStyle}"
  271. Tag="Circle"
  272. Visibility="Collapsed">
  273. <Path
  274. Name="CirclePath"
  275. Data="M10,1.75 C5.44365081,1.75 1.75,5.44365081 1.75,10 C1.75,14.5563492 5.44365081,18.25 10,18.25 C14.5563492,18.25 18.25,14.5563492 18.25,10 C18.25,5.44365081 14.5563492,1.75 10,1.75 Z M10,3.25 C13.7279221,3.25 16.75,6.27207794 16.75,10 C16.75,13.7279221 13.7279221,16.75 10,16.75 C6.27207794,16.75 3.25,13.7279221 3.25,10 C3.25,6.27207794 6.27207794,3.25 10,3.25 Z"
  276. Fill="{StaticResource color.icon.base.brand}" />
  277. </customControl:CustomIconToggleBtn>
  278. <customControl:CustomIconToggleBtn
  279. x:Name="BtnArrow"
  280. Click="BtnTool_Click"
  281. Command="{Binding MyToolsCommand}"
  282. CommandParameter="{Binding ElementName=BtnArrow}"
  283. Style="{StaticResource ToggleBtnViewModeStyle}"
  284. Tag="Arrow"
  285. Visibility="Collapsed">
  286. <Path
  287. Name="ArrowPath"
  288. Data="M16.75,3.25 L16.75,10 L15.25,10 L15.2496699,5.81 L2.53033009,18.5303301 L1.46966991,17.4696699 L14.1886699,4.75 L10,4.75 L10,3.25 L16.75,3.25 Z"
  289. Fill="{StaticResource color.icon.base.brand}" />
  290. </customControl:CustomIconToggleBtn>
  291. <customControl:CustomIconToggleBtn
  292. x:Name="BtnLine"
  293. Click="BtnTool_Click"
  294. Command="{Binding MyToolsCommand}"
  295. CommandParameter="{Binding ElementName=BtnLine}"
  296. Style="{StaticResource ToggleBtnViewModeStyle}"
  297. Tag="Line"
  298. Visibility="Collapsed">
  299. <Polygon
  300. Name="LinePath"
  301. Fill="{StaticResource color.icon.base.brand}"
  302. Points="16.4696699 2.46966991 17.5303301 3.53033009 3.53033009 17.5303301 2.46966991 16.4696699" />
  303. </customControl:CustomIconToggleBtn>
  304. <Separator
  305. x:Name="Separator2"
  306. Width="1"
  307. Height="24"
  308. Margin="18,0,18,0"
  309. BorderBrush="{StaticResource color.sys.layout.divider}"
  310. BorderThickness="5"
  311. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"
  312. Visibility="Collapsed" />
  313. <customControl:CustomIconToggleBtn
  314. x:Name="BtnLink"
  315. Click="BtnTool_Click"
  316. Command="{Binding MyToolsCommand}"
  317. CommandParameter="{Binding ElementName=BtnLink}"
  318. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Link}"
  319. Style="{StaticResource ToggleBtnViewModeStyle}"
  320. Tag="Link">
  321. <Grid>
  322. <Path Data="M6.29289 12.2926L12.293 6.29297L13.7071 7.70724L7.70705 13.7069L6.29289 12.2926Z" Fill="{StaticResource color.icon.base.neutral.norm.lv2}" />
  323. <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="{StaticResource color.icon.base.brand}" />
  324. </Grid>
  325. </customControl:CustomIconToggleBtn>
  326. <customControl:CustomIconToggleBtn
  327. x:Name="BtnStamp"
  328. Click="BtnTool_Click"
  329. Command="{Binding MyToolsCommand}"
  330. CommandParameter="{Binding ElementName=BtnStamp}"
  331. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Stamp}"
  332. Style="{StaticResource ToggleBtnViewModeStyle}"
  333. Tag="Stamp">
  334. <Grid Width="20" Height="20">
  335. <Image>
  336. <Image.Source>
  337. <DrawingImage PresentationOptions:Freeze="True">
  338. <DrawingImage.Drawing>
  339. <DrawingGroup>
  340. <DrawingGroup x:Name="DrawingLayer">
  341. <DrawingGroup.ClipGeometry>
  342. <RectangleGeometry Rect="0,0,20,20" />
  343. </DrawingGroup.ClipGeometry>
  344. <DrawingGroup.Transform>
  345. <TranslateTransform X="0" Y="2" />
  346. </DrawingGroup.Transform>
  347. <DrawingGroup>
  348. <DrawingGroup.OpacityMask>
  349. <DrawingBrush
  350. Stretch="Uniform"
  351. TileMode="None"
  352. Viewbox="0,-2,20,20"
  353. ViewboxUnits="Absolute"
  354. Viewport="0,-2,20,20"
  355. ViewportUnits="Absolute">
  356. <DrawingBrush.Drawing>
  357. <DrawingGroup>
  358. <GeometryDrawing Brush="#FFFFFFFF">
  359. <GeometryDrawing.Geometry>
  360. <PathGeometry Figures="M14,4C14,4.40591,13.9395,4.79769,13.8271,5.16684L13.1111,10 15.5,10C16.8807,10,18,11.1193,18,12.5L18,15.1071C18,15.6003,17.6003,16,17.1071,16L2.89286,16C2.39975,16,2,15.6003,2,15.1071L2,12.5C2,11.1193,3.11929,10,4.5,10L6.88889,10 6.17287,5.16684C6.06046,4.79769 6,4.40591 6,4 6,1.79086 7.79086,0 10,0 12.2091,0 14,1.79086 14,4z" FillRule="EvenOdd" />
  361. </GeometryDrawing.Geometry>
  362. </GeometryDrawing>
  363. </DrawingGroup>
  364. </DrawingBrush.Drawing>
  365. </DrawingBrush>
  366. </DrawingGroup.OpacityMask>
  367. <GeometryDrawing Brush="{StaticResource color.icon.base.brand}">
  368. <GeometryDrawing.Geometry>
  369. <PathGeometry Figures="M13.8271,5.16684L11.9139,4.58425 11.8705,4.72657 11.8487,4.87374 13.8271,5.16684z M13.1111,10L11.1327,9.7069 10.793,12 13.1111,12 13.1111,10z M6.88889,10L6.88889,12 9.20701,12 8.8673,9.7069 6.88889,10z M6.17287,5.16684L8.15127,4.87374 8.12947,4.72658 8.08613,4.58425 6.17287,5.16684z M15.7404,5.74943C15.9097,5.19351,16,4.60548,16,4L12,4C12,4.20633,11.9694,4.40187,11.9139,4.58425L15.7404,5.74943z M15.0895,10.2931L15.8055,5.45994 11.8487,4.87374 11.1327,9.7069 15.0895,10.2931z M13.1111,12L15.5,12 15.5,8 13.1111,8 13.1111,12z M15.5,12C15.7761,12,16,12.2239,16,12.5L20,12.5C20,10.0147,17.9853,8,15.5,8L15.5,12z M16,12.5L16,15.1071 20,15.1071 20,12.5 16,12.5z M16,15.1071C16,14.4957,16.4957,14,17.1071,14L17.1071,18C18.7048,18,20,16.7048,20,15.1071L16,15.1071z M17.1071,14L2.89286,14 2.89286,18 17.1071,18 17.1071,14z M2.89286,14C3.50432,14,4,14.4957,4,15.1071L0,15.1071C0,16.7048,1.29518,18,2.89286,18L2.89286,14z M4,15.1071L4,12.5 0,12.5 0,15.1071 4,15.1071z M4,12.5C4,12.2239,4.22386,12,4.5,12L4.5,8C2.01472,8,0,10.0147,0,12.5L4,12.5z M4.5,12L6.88889,12 6.88889,8 4.5,8 4.5,12z M4.19446,5.45994L4.91048,10.2931 8.8673,9.7069 8.15127,4.87374 4.19446,5.45994z M4,4C4,4.60549,4.09032,5.19351,4.2596,5.74943L8.08613,4.58425C8.0306,4.40187,8,4.20632,8,4L4,4z M10,-2C6.68629,-2,4,0.686291,4,4L8,4C8,2.89543,8.89543,2,10,2L10,-2z M16,4C16,0.686291,13.3137,-2,10,-2L10,2C11.1046,2,12,2.89543,12,4L16,4z" FillRule="Nonzero" />
  370. </GeometryDrawing.Geometry>
  371. </GeometryDrawing>
  372. </DrawingGroup>
  373. <GeometryDrawing Brush="{StaticResource color.icon.base.neutral.norm.lv2}">
  374. <GeometryDrawing.Geometry>
  375. <PathGeometry Figures="M15,19L5,19 5,17 15,17 15,19z" FillRule="EvenOdd" />
  376. </GeometryDrawing.Geometry>
  377. </GeometryDrawing>
  378. </DrawingGroup>
  379. </DrawingGroup>
  380. </DrawingImage.Drawing>
  381. </DrawingImage>
  382. </Image.Source>
  383. </Image>
  384. </Grid>
  385. </customControl:CustomIconToggleBtn>
  386. <customControl:CustomIconToggleBtn
  387. x:Name="BtnImage"
  388. Click="BtnTool_Click"
  389. Command="{Binding MyToolsCommand}"
  390. CommandParameter="{Binding ElementName=BtnImage}"
  391. Style="{StaticResource ToggleBtnViewModeStyle}"
  392. Tag="Image"
  393. Visibility="Collapsed">
  394. <Path Data="M18.75,3.25 L18.75,16.75 L1.25,16.75 L1.25,3.25 L18.75,3.25 Z M17.25,4.75 L2.75,4.75 L2.75,13.209 L5.79495643,10 L10.0642824,13.5 L12.3718478,11.0677556 L17.144,15.25 L17.25,15.25 L17.25,4.75 Z M14.5,6 C15.3284271,6 16,6.67157288 16,7.5 C16,8.32842712 15.3284271,9 14.5,9 C13.6715729,9 13,8.32842712 13,7.5 C13,6.67157288 13.6715729,6 14.5,6 Z" Fill="{StaticResource color.icon.base.brand}" />
  395. </customControl:CustomIconToggleBtn>
  396. <customControl:CustomIconToggleBtn
  397. x:Name="BtnSignature"
  398. Click="BtnTool_Click"
  399. Command="{Binding MyToolsCommand}"
  400. CommandParameter="{Binding ElementName=BtnSignature}"
  401. IsChecked="{Binding StrAnnotToolChecked, Converter={StaticResource AnnotToolIsCheckedConvert}, ConverterParameter=Signature}"
  402. Style="{StaticResource ToggleBtnViewModeStyle}"
  403. Tag="Signature">
  404. <Grid>
  405. <Path
  406. Data="M10.8335 17.6663C11.6072 16.6525 13.7671 14.333 15.567 14.333C16.287 14.333 16.287 15.7247 17.0069 16.1886C17.8622 16.7397 18.5339 16.4168 19.1668 15.7247"
  407. Stroke="{StaticResource color.icon.base.neutral.norm.lv2}"
  408. StrokeThickness="2" />
  409. <Path Data="M8.43282 6.60294L10.4067 0.823139L8.51406 0.176758L6.27441 6.73466L6.03285 7.44197L2.42204 11.1051C2.24459 11.2851 2.15176 11.5319 2.16658 11.7843L2.5398 18.1387C2.57742 18.7791 3.25806 19.1721 3.83152 18.8844L9.52117 16.0305C9.74712 15.9171 9.91444 15.7133 9.98162 15.4696L11.3487 10.5106L11.8402 9.94807L16.3997 4.72953L14.8936 3.41362L10.8751 8.01298L8.43282 6.60294ZM7.73629 8.56284L4.192 12.1585L4.32808 14.4753L5.90638 11.7988L7.62915 12.8147L6.01526 15.5515L8.18439 14.4635L9.52618 9.59623L7.73629 8.56284Z" Fill="{StaticResource color.icon.base.brand}" />
  410. </Grid>
  411. </customControl:CustomIconToggleBtn>
  412. <Separator
  413. x:Name="Separator3"
  414. Width="1"
  415. Height="16"
  416. Margin="10,0,10,0"
  417. BorderBrush="{StaticResource color.sys.layout.divider}"
  418. BorderThickness="5"
  419. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  420. <customControl:CustomIconToggleBtn
  421. x:Name="BtnBookMark"
  422. Click="BtnBookMark_Click"
  423. Style="{StaticResource ToggleBtnViewModeStyle}"
  424. Visibility="Collapsed">
  425. <Grid>
  426. <Path Data="M16.75,1.25 L3.25,1.25 L3.25,19.4013878 L10,14.902 L16.75,19.4013878 L16.75,1.25 Z M15.25,2.75 L15.25,16.598 L10,13.0986122 L4.75,16.597 L4.75,2.75 L15.25,2.75 Z" Fill="{StaticResource color.icon.base.brand}" />
  427. <Polygon
  428. x:Name="BookMakrHighlight"
  429. Fill="#FFBB00"
  430. Points="16.75 1.25 3.25 1.25 3.25 19.4013878 10 14.902 16.75 19.4013878"
  431. Visibility="Collapsed" />
  432. </Grid>
  433. </customControl:CustomIconToggleBtn>
  434. <customControl:CustomIconToggleBtn
  435. x:Name="BtnShowAnnot"
  436. Padding="1.3,1,0,0"
  437. Click="BtnTool_Click"
  438. Command="{Binding ShowOrHiddenAnnotCommand}"
  439. CommandParameter="{Binding ElementName=BtnShowAnnot}"
  440. IsChecked="{Binding BtnShowAnnotIsChecked}"
  441. Style="{StaticResource ToggleBtnShowAnnotViewModeStyle}"
  442. Tag="ShowAnnot">
  443. <!--<Grid>
  444. <Path
  445. Width="20"
  446. Height="20"
  447. HorizontalAlignment="Center"
  448. VerticalAlignment="Center"
  449. Data="M19 10C19 10.1949 18.859 10.6759 18.3852 11.3782C17.9381 12.0409 17.2726 12.7841 16.4329 13.4801C14.7446 14.8795 12.4627 16 10 16C7.50771 16 5.22082 14.981 3.55093 13.6545C2.71821 12.993 2.06253 12.2733 1.62266 11.6009C1.17041 10.9097 1 10.3526 1 10C1 9.64743 1.17041 9.0903 1.62266 8.39905C2.06253 7.72674 2.71821 7.00699 3.55093 6.34552C5.22082 5.01903 7.50771 4 10 4C12.4627 4 14.7446 5.12047 16.4329 6.5199C17.2726 7.21593 17.9381 7.95909 18.3852 8.6218C18.859 9.32408 19 9.80507 19 10Z"
  450. Stroke="{StaticResource color.icon.base.brand}"
  451. StrokeThickness="2" />
  452. <Ellipse
  453. Width="8"
  454. Height="8"
  455. Stroke="#94989c"
  456. StrokeThickness="2">
  457. <Ellipse.RenderTransform>
  458. <TranslateTransform X="-0.5" Y="-0.5" />
  459. </Ellipse.RenderTransform>
  460. </Ellipse>
  461. </Grid>-->
  462. </customControl:CustomIconToggleBtn>
  463. </WrapPanel>
  464. </Border>
  465. </Grid>
  466. </UserControl>