SharpsAnnotProperty.xaml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.SharpsAnnotProperty"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
  7. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  8. xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
  15. </ResourceDictionary.MergedDictionaries>
  16. <Convert:ColorToBrushConverter x:Key="ColorToBrushConvert"></Convert:ColorToBrushConverter>
  17. <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
  18. <Style x:Key="line1Style" TargetType="{x:Type Line}">
  19. <Setter Property="Visibility">
  20. <Setter.Value>
  21. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  22. <Binding ElementName="SharpRectBtn" Path="IsChecked"/>
  23. <Binding ElementName="SharpCircleBtn" Path="IsChecked"/>
  24. </MultiBinding>
  25. </Setter.Value>
  26. </Setter>
  27. </Style>
  28. <Style x:Key="line2Style" TargetType="{x:Type Line}">
  29. <Setter Property="Visibility">
  30. <Setter.Value>
  31. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  32. <Binding ElementName="SharpCircleBtn" Path="IsChecked"/>
  33. <Binding ElementName="SharpArrowBtn" Path="IsChecked"/>
  34. </MultiBinding>
  35. </Setter.Value>
  36. </Setter>
  37. </Style>
  38. <Style x:Key="line3Style" TargetType="{x:Type Line}">
  39. <Setter Property="Visibility">
  40. <Setter.Value>
  41. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  42. <Binding ElementName="SharpArrowBtn" Path="IsChecked"/>
  43. <Binding ElementName="SharpLineBtn" Path="IsChecked"/>
  44. </MultiBinding>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. </ResourceDictionary>
  49. </UserControl.Resources>
  50. <Grid Background="Wheat">
  51. <StackPanel>
  52. <TextBlock Name="AnnotTypeTitle" FontFamily="SegoeUI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Center" Margin="0,8,0,0">Freehand</TextBlock>
  53. <Border Width="232" Height="80" BorderThickness="1" BorderBrush="#E2E3E6" Margin="0,8,0,0">
  54. <Grid>
  55. <!--<Path Name="SharpPath" Opacity="{Binding ElementName=OpacitySlider,Path=Value}" StrokeThickness="{Binding ElementName=ThicknessSlider,Path=Value}"
  56. Stroke="{Binding ElementName=BorderColorPicker,Path=SelectedColor,Converter={StaticResource ColorToBrushConvert}}"
  57. Fill="{Binding ElementName=FillColorPicker,Path=SelectedColor,Converter={StaticResource ColorToBrushConvert}}"
  58. Width="36" Height="36" HorizontalAlignment="Center" VerticalAlignment="Center">
  59. </Path>-->
  60. </Grid>
  61. </Border>
  62. <Border Width="162" Height="32" Margin="0,12,0,0" BorderThickness="1" BorderBrush="#FFE2E3E6">
  63. <Grid Name="ToolGrid">
  64. <Grid.ColumnDefinitions>
  65. <ColumnDefinition Width="40.5"></ColumnDefinition>
  66. <ColumnDefinition Width="40.5"></ColumnDefinition>
  67. <ColumnDefinition Width="40.5"></ColumnDefinition>
  68. <ColumnDefinition Width="40.5"></ColumnDefinition>
  69. </Grid.ColumnDefinitions>
  70. <ToggleButton Name="SharpRectBtn" Tag="Rect" Width="40.5" Background="Transparent" BorderThickness="0">
  71. <Rectangle HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Stroke="#273C62"></Rectangle>
  72. </ToggleButton>
  73. <Line Name="line1" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000">
  74. </Line>
  75. <ToggleButton Name="SharpCircleBtn" Width="40.5" Tag="Circle" Grid.Column="1" Background="Transparent" BorderThickness="0" Margin="0,0,0,0">
  76. <Ellipse Width="16" Height="16" Stroke="#273C62" HorizontalAlignment="Center" VerticalAlignment="Center" ></Ellipse>
  77. </ToggleButton>
  78. <Line Name="line2" HorizontalAlignment="Left" Style="{StaticResource line2Style}" VerticalAlignment="Center" Grid.Column="2" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
  79. <ToggleButton Name="SharpArrowBtn" Width="40.5" Tag="Arrow" Grid.Column="2" Background="Transparent" BorderThickness="0" >
  80. <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62" Width="16" Height="16">
  81. <Path.Data>
  82. M13.4,2.6 L13.4,8 L12.2,8 L12.1997359,4.648 L2.02426407,14.8242641 L1.17573593,13.9757359 L11.3517359,3.799 L8,3.8 L8,2.6 L13.4,2.6 Z
  83. </Path.Data>
  84. </Path>
  85. </ToggleButton>
  86. <Line x:Name="line3" HorizontalAlignment="Left" Style="{StaticResource line3Style}" VerticalAlignment="Center" Grid.Column="3" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
  87. <ToggleButton Name="SharpLineBtn" Width="40.5" Tag="Line" Grid.Column="3" Background="Transparent" BorderThickness="0">
  88. <Polygon Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62">
  89. <Polygon.Points>
  90. 13.1757359 1.97573593 14.0242641 2.82426407 2.82426407 14.0242641 1.97573593 13.1757359
  91. </Polygon.Points>
  92. </Polygon>
  93. </ToggleButton>
  94. </Grid>
  95. </Border>
  96. <Grid Margin="0,18,0,0">
  97. <Grid.ColumnDefinitions>
  98. <ColumnDefinition Width="*"></ColumnDefinition>
  99. <ColumnDefinition Width="*"></ColumnDefinition>
  100. </Grid.ColumnDefinitions>
  101. <TextBlock x:Name="borderColorText" LineHeight="20" Margin="12,0,0,0" VerticalAlignment="Center">Border</TextBlock>
  102. <cus:ColorDropBox x:Name="BorderColorPicker" Grid.Column="1" Margin="0,0,12,0" BorderThickness="1" HorizontalAlignment="Right"
  103. BorderBrush="#E2E3E6" Width="80" Height="32" ></cus:ColorDropBox>
  104. </Grid>
  105. <Grid Margin="0,18,0,0" Name="FillGrid">
  106. <Grid.ColumnDefinitions>
  107. <ColumnDefinition Width="*"></ColumnDefinition>
  108. <ColumnDefinition Width="*"></ColumnDefinition>
  109. </Grid.ColumnDefinitions>
  110. <TextBlock x:Name="FillColorText" LineHeight="20" Margin="12,0,0,0" VerticalAlignment="Center">Fill</TextBlock>
  111. <cus:ColorDropBox x:Name="FillColorPicker" Grid.Column="1" Margin="0,0,12,0" BorderThickness="1" HorizontalAlignment="Right" HasTransparentColor="True"
  112. BorderBrush="#E2E3E6" Width="80" Height="32" ></cus:ColorDropBox>
  113. </Grid>
  114. <Grid Margin="12,18,0,0" Name="ArrowGrid" Visibility="Visible">
  115. <Grid.RowDefinitions>
  116. <RowDefinition Height="auto"></RowDefinition>
  117. <RowDefinition Height="auto"></RowDefinition>
  118. </Grid.RowDefinitions>
  119. <Grid.ColumnDefinitions>
  120. <ColumnDefinition Width="auto"></ColumnDefinition>
  121. <ColumnDefinition Width="auto"></ColumnDefinition>
  122. </Grid.ColumnDefinitions>
  123. <TextBlock x:Name="StartAndEndText" Grid.ColumnSpan="2" LineHeight="20" Margin="0,6,0,0" VerticalAlignment="Center">Start &amp; End</TextBlock>
  124. <Border Grid.Row="1" BorderBrush="#E2E3E6" BorderThickness="0" Width="115" Height="32">
  125. <Grid>
  126. <ComboBox Name="StartArrowBox" Background="Transparent" BorderThickness="1" BorderBrush="#FFE2E3E6" IsReadOnly="True"
  127. MaxDropDownHeight="200">
  128. <ComboBox.ItemContainerStyle>
  129. <Style TargetType="{x:Type ComboBoxItem}">
  130. <Setter Property="Padding" Value="25 0 0 0"/>
  131. </Style>
  132. </ComboBox.ItemContainerStyle>
  133. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  134. <Path Fill="#000000" Tag="Line" Height="20">
  135. <Path.Data>
  136. F1 M40,16z M0,0z M34,7.5L34,7.5 34,8.5 6,8.5 6,7.5z
  137. </Path.Data>
  138. </Path>
  139. </ComboBoxItem>
  140. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  141. <Path Fill="#000000" Tag="Arrow" Height="20">
  142. <Path.Data>
  143. F1 M40,16z M0,0z M10.7427521,4.57125354L11.2572479,5.42874646 7.80417468,7.49925354 34,7.5 34,8.5 7.80417468,8.49925354 11.2572479,10.5712535 10.7427521,11.4287465 5.02817468,8 10.7427521,4.57125354z
  144. </Path.Data>
  145. </Path>
  146. </ComboBoxItem>
  147. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  148. <Path Fill="#000000" Tag="CloseArrow" Height="20">
  149. <Path.Data>
  150. F1 M40,16z M0,0z M11.5,4.11690481L11.4991747,7.49990481 34,7.5 34,8.5 11.4991747,8.49990481 11.5,11.8830952 5.02817468,8 11.5,4.11690481z
  151. </Path.Data>
  152. </Path>
  153. </ComboBoxItem>
  154. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  155. <Path Fill="#000000" Tag="Square" Height="20">
  156. <Path.Data>
  157. M11.5,5 L11.5,7.5 L34,7.5 L34,8.5 L11.5,8.5 L11.5,11 L5.5,11 L5.5,5 L11.5,5 Z
  158. </Path.Data>
  159. </Path>
  160. </ComboBoxItem>
  161. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  162. <Path Fill="#000000" Tag="Circle" Height="20">
  163. <Path.Data>
  164. M8.5,5 C9.98660106,5 11.2206526,6.08129303 11.4585702,7.50029469 L34,7.5 L34,8.5 L11.4584039,8.50069618 C11.2200781,9.9192103 9.98625501,11 8.5,11 C6.84314575,11 5.5,9.65685425 5.5,8 C5.5,6.34314575 6.84314575,5 8.5,5 Z
  165. </Path.Data>
  166. </Path>
  167. </ComboBoxItem>
  168. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  169. <Path Fill="#000000" Tag="Diamond" Height="20">
  170. <Path.Data>
  171. M9,4.29289322 L12.2068932,7.49989322 L34,7.5 L34,8.5 L12.2068932,8.49989322 L9,11.7071068 L5.29289322,8 L9,4.29289322 Z
  172. </Path.Data>
  173. </Path>
  174. </ComboBoxItem>
  175. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  176. <Path Fill="#000000" Tag="Butt" Height="20">
  177. <Path.Data>
  178. M7.5,5.5 L7.5,7.5 L34,7.5 L34,8.5 L7.5,8.5 L7.5,10.5 L6.5,10.5 L6.5,5.5 L7.5,5.5 Z
  179. </Path.Data>
  180. </Path>
  181. </ComboBoxItem>
  182. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  183. <Path Fill="#000000" Tag="RArrow" Height="20">
  184. <Path.Data>
  185. M5.58660083,5.07600085 L9.46460189,7.49900085 L34,7.5 L34,8.5 L9.46460189,8.49900085 L5.58660083,10.9239992 L5.05660189,10.0760008 L8.37960136,8 L5.05660189,5.92399915 L5.58660083,5.07600085 Z
  186. </Path.Data>
  187. </Path>
  188. </ComboBoxItem>
  189. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  190. <Path Fill="#000000" Tag="RCloseArrow" Height="20">
  191. <Path.Data>
  192. M5.5,4.59787618 L10.143,7.49987618 L34,7.5 L34,8.5 L10.143,8.49987618 L5.5,11.4021238 L5.5,4.59787618 Z
  193. </Path.Data>
  194. </Path>
  195. </ComboBoxItem>
  196. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  197. <Path Fill="#000000" Tag="Slash" Height="20">
  198. <Path.Data>
  199. M9.531981,5.84644661 L10.239087,6.55355339 L9.292447,7.49944661 L34,7.5 L34,8.5 L8.292447,8.49944661 L6.703553,10.0890873 L5.996447,9.38198052 L9.531981,5.84644661 Z
  200. </Path.Data>
  201. </Path>
  202. </ComboBoxItem>
  203. </ComboBox>
  204. <TextBox Background="White" Height="20" Margin="10,0,35,0"
  205. BorderThickness="0" VerticalAlignment="Center" IsReadOnly="True">
  206. </TextBox>
  207. <Path Name="StartArrowPath" VerticalAlignment="Center" Fill="#000000" Width="56" Height="16" Margin="30,8,0,8" HorizontalAlignment="Left"></Path>
  208. </Grid>
  209. </Border>
  210. <Border Grid.Row="1" Grid.Column="1" BorderBrush="#E2E3E6" BorderThickness="0" Width="115" Height="32" Margin="4,0,0,0">
  211. <Grid>
  212. <ComboBox Name="EndArrowBox" Background="Transparent" BorderBrush="#FFE2E3E6" BorderThickness="1" IsReadOnly="True"
  213. MaxDropDownHeight="200">
  214. <ComboBox.ItemContainerStyle>
  215. <Style TargetType="{x:Type ComboBoxItem}">
  216. <Setter Property="Padding" Value="25 0 0 0"/>
  217. </Style>
  218. </ComboBox.ItemContainerStyle>
  219. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  220. <Path Fill="#000000" Tag="Line" Height="20">
  221. <Path.Data>
  222. F1 M40,16z M0,0z M34,7.5L34,7.5 34,8.5 6,8.5 6,7.5z
  223. </Path.Data>
  224. </Path>
  225. </ComboBoxItem>
  226. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  227. <Path Fill="#000000" Tag="Arrow" Height="20">
  228. <Path.Data>
  229. F1 M40,16z M0,0z M10.7427521,4.57125354L11.2572479,5.42874646 7.80417468,7.49925354 34,7.5 34,8.5 7.80417468,8.49925354 11.2572479,10.5712535 10.7427521,11.4287465 5.02817468,8 10.7427521,4.57125354z
  230. </Path.Data>
  231. <Path.LayoutTransform>
  232. <RotateTransform Angle="180"></RotateTransform>
  233. </Path.LayoutTransform>
  234. </Path>
  235. </ComboBoxItem>
  236. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  237. <Path Fill="#000000" Tag="CloseArrow" Height="20">
  238. <Path.Data>
  239. F1 M40,16z M0,0z M11.5,4.11690481L11.4991747,7.49990481 34,7.5 34,8.5 11.4991747,8.49990481 11.5,11.8830952 5.02817468,8 11.5,4.11690481z
  240. </Path.Data>
  241. <Path.LayoutTransform>
  242. <RotateTransform Angle="180"></RotateTransform>
  243. </Path.LayoutTransform>
  244. </Path>
  245. </ComboBoxItem>
  246. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  247. <Path Fill="#000000" Tag="Square" Height="20" Margin="6,0,0,0" >
  248. <Path.Data>
  249. M11.5,5 L11.5,7.5 L34,7.5 L34,8.5 L11.5,8.5 L11.5,11 L5.5,11 L5.5,5 L11.5,5 Z
  250. </Path.Data>
  251. <Path.LayoutTransform>
  252. <RotateTransform Angle="180"></RotateTransform>
  253. </Path.LayoutTransform>
  254. </Path>
  255. </ComboBoxItem>
  256. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  257. <Path Fill="#000000" Tag="Circle" Height="20" Margin="6,0,0,0" >
  258. <Path.Data>
  259. M8.5,5 C9.98660106,5 11.2206526,6.08129303 11.4585702,7.50029469 L34,7.5 L34,8.5 L11.4584039,8.50069618 C11.2200781,9.9192103 9.98625501,11 8.5,11 C6.84314575,11 5.5,9.65685425 5.5,8 C5.5,6.34314575 6.84314575,5 8.5,5 Z
  260. </Path.Data>
  261. <Path.LayoutTransform>
  262. <RotateTransform Angle="180"></RotateTransform>
  263. </Path.LayoutTransform>
  264. </Path>
  265. </ComboBoxItem>
  266. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  267. <Path Fill="#000000" Tag="Diamond" Height="20" Margin="6,0,0,0" >
  268. <Path.Data>
  269. M9,4.29289322 L12.2068932,7.49989322 L34,7.5 L34,8.5 L12.2068932,8.49989322 L9,11.7071068 L5.29289322,8 L9,4.29289322 Z
  270. </Path.Data>
  271. <Path.LayoutTransform>
  272. <RotateTransform Angle="180"></RotateTransform>
  273. </Path.LayoutTransform>
  274. </Path>
  275. </ComboBoxItem>
  276. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  277. <Path Fill="#000000" Tag="Butt" Height="20" Margin="6,0,0,0" >
  278. <Path.Data>
  279. M7.5,5.5 L7.5,7.5 L34,7.5 L34,8.5 L7.5,8.5 L7.5,10.5 L6.5,10.5 L6.5,5.5 L7.5,5.5 Z
  280. </Path.Data>
  281. <Path.LayoutTransform>
  282. <RotateTransform Angle="180"></RotateTransform>
  283. </Path.LayoutTransform>
  284. </Path>
  285. </ComboBoxItem>
  286. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  287. <Path Fill="#000000" Tag="RArrow" Height="20" Margin="6,0,0,0" >
  288. <Path.Data>
  289. M5.58660083,5.07600085 L9.46460189,7.49900085 L34,7.5 L34,8.5 L9.46460189,8.49900085 L5.58660083,10.9239992 L5.05660189,10.0760008 L8.37960136,8 L5.05660189,5.92399915 L5.58660083,5.07600085 Z
  290. </Path.Data>
  291. <Path.LayoutTransform>
  292. <RotateTransform Angle="180"></RotateTransform>
  293. </Path.LayoutTransform>
  294. </Path>
  295. </ComboBoxItem>
  296. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  297. <Path Fill="#000000" Tag="RCloseArrow" Height="20" Margin="6,0,0,0" >
  298. <Path.Data>
  299. M5.5,4.59787618 L10.143,7.49987618 L34,7.5 L34,8.5 L10.143,8.49987618 L5.5,11.4021238 L5.5,4.59787618 Z
  300. </Path.Data>
  301. <Path.LayoutTransform>
  302. <RotateTransform Angle="180"></RotateTransform>
  303. </Path.LayoutTransform>
  304. </Path>
  305. </ComboBoxItem>
  306. <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  307. <Path Fill="#000000" Tag="Slash" Height="20" Margin="6,0,0,0" >
  308. <Path.Data>
  309. M9.531981,5.84644661 L10.239087,6.55355339 L9.292447,7.49944661 L34,7.5 L34,8.5 L8.292447,8.49944661 L6.703553,10.0890873 L5.996447,9.38198052 L9.531981,5.84644661 Z
  310. </Path.Data>
  311. <Path.LayoutTransform>
  312. <RotateTransform Angle="180"></RotateTransform>
  313. </Path.LayoutTransform>
  314. </Path>
  315. </ComboBoxItem>
  316. </ComboBox>
  317. <TextBox Background="White" Height="20" Margin="10,0,35,0"
  318. BorderThickness="0" VerticalAlignment="Center" IsReadOnly="True">
  319. </TextBox>
  320. <Path Name="EndArrowPath" Fill="#000000" Width="56" Height="16" Margin="12,8,0,8" HorizontalAlignment="Left">
  321. <Path.LayoutTransform>
  322. <RotateTransform Angle="180"></RotateTransform>
  323. </Path.LayoutTransform>
  324. </Path>
  325. </Grid>
  326. </Border>
  327. </Grid>
  328. <TextBlock x:Name="LineStyleText" LineHeight="20" Margin="12,14,0,0">Line Style</TextBlock>
  329. <Grid>
  330. <Grid.ColumnDefinitions>
  331. <ColumnDefinition Width="auto"></ColumnDefinition>
  332. <ColumnDefinition Width="auto"></ColumnDefinition>
  333. <ColumnDefinition Width="*"></ColumnDefinition>
  334. </Grid.ColumnDefinitions>
  335. <Grid.RowDefinitions>
  336. <RowDefinition Height="auto"></RowDefinition>
  337. <RowDefinition Height="auto"></RowDefinition>
  338. </Grid.RowDefinitions>
  339. <Viewbox Height="18" Width="18" Margin="12,12,10,0">
  340. <RadioButton Tag="SolidLine" Name="SolidLineBtn" GroupName="LineStyleGroup" IsChecked="True" ></RadioButton>
  341. </Viewbox>
  342. <Line Name="SolidLineControl" Margin="0,12,0,0" Grid.Column="1" Stroke="#000000" StrokeThickness="2" X1="0" Y1="0" X2="112" Y2="0" VerticalAlignment="Center"></Line>
  343. <Viewbox Grid.Row="1" Height="18" Width="18" Margin="12,22,10,0">
  344. <RadioButton Tag="DashLine" Name="DashLineBtn" GroupName="LineStyleGroup" VerticalAlignment="Center"/>
  345. </Viewbox>
  346. <Line Name="DashLineControl" Margin="0,22,0,0" Grid.Row="1" Grid.Column="1" Stroke="#000000" StrokeThickness="2" X1="0" Y1="0" X2="112" Y2="0" VerticalAlignment="Center" StrokeDashArray="0,1,1"></Line>
  347. <!--<cus:AutoNumber x:Name="NumberBox" Grid.Row="1" Grid.Column="2" Width="80" Height="32" Margin="0,22,0,0" Maximum="50" Minimum="1" TickFrequency="1" Current="1"
  348. BorderBrush="#FFE2E3E6" BorderThickness="1" IsEnabled="False" NumberChanged="NumberBox_NumberChanged">
  349. <local:AutoNumber.Resources>
  350. <Style TargetType="local:AutoNumber">
  351. <Style.Triggers>
  352. <Trigger Property="IsEnabled" Value="False">
  353. <Setter Property = "Background" Value="LightGray"/>
  354. </Trigger>
  355. <Trigger Property="IsEnabled" Value="True">
  356. <Setter Property = "Background" Value="White"/>
  357. </Trigger>
  358. </Style.Triggers>
  359. </Style>
  360. </local:AutoNumber.Resources>
  361. </cus:AutoNumber>-->
  362. </Grid>
  363. <TextBlock x:Name="thicknessText" LineHeight="20" Margin="12,14,0,0" >Thickness</TextBlock>
  364. <Grid>
  365. <Grid.ColumnDefinitions>
  366. <ColumnDefinition Width="*"></ColumnDefinition>
  367. <ColumnDefinition Width="auto"></ColumnDefinition>
  368. </Grid.ColumnDefinitions>
  369. <Slider Name="ThicknessSlider" VerticalAlignment="Center" Margin="12,0,4,0" Minimum="1" Maximum="12" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
  370. Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True">
  371. <Slider.Resources>
  372. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  373. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  374. </Slider.Resources>
  375. </Slider>
  376. <Border Grid.Column="1" BorderBrush="#E2E3E6" Width="80" Height="32" Margin="0,0,12,0" BorderThickness="0">
  377. <Grid>
  378. <ComboBox Name="ThicknessDropBox" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
  379. <ComboBox.ItemContainerStyle>
  380. <Style TargetType="{x:Type ComboBoxItem}">
  381. <Setter Property="Padding" Value="10 0 0 0"/>
  382. </Style>
  383. </ComboBox.ItemContainerStyle>
  384. <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  385. <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  386. <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  387. <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  388. <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  389. </ComboBox>
  390. <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Padding="0" Height="20" Margin="10,0,35,0" IsReadOnly="True"
  391. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" Text="{Binding ElementName=ThicknessSlider,Path=Value}">
  392. </TextBox>
  393. </Grid>
  394. </Border>
  395. </Grid>
  396. <TextBlock x:Name="opacityText" LineHeight="20" Margin="12,14,0,0" >Opacity</TextBlock>
  397. <Grid>
  398. <Grid.ColumnDefinitions>
  399. <ColumnDefinition Width="*"></ColumnDefinition>
  400. <ColumnDefinition Width="auto"></ColumnDefinition>
  401. </Grid.ColumnDefinitions>
  402. <Slider Name="OpacitySlider" VerticalAlignment="Center" Margin="12,0,4,0" Minimum="0" Maximum="1" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
  403. Style="{StaticResource RoundThumbSlider}" TickFrequency="0.01" >
  404. <Slider.Resources>
  405. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  406. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  407. </Slider.Resources>
  408. </Slider>
  409. <Border Grid.Column="1" BorderBrush="#E2E3E6" Width="80" Height="32" Margin="0,0,12,0" BorderThickness="0">
  410. <Grid>
  411. <ComboBox Name="OpacityDropBox" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6">
  412. <ComboBox.ItemContainerStyle>
  413. <Style TargetType="{x:Type ComboBoxItem}">
  414. <Setter Property="Padding" Value="10 0 0 0"/>
  415. </Style>
  416. </ComboBox.ItemContainerStyle>
  417. <ComboBoxItem Content="25%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" />
  418. <ComboBoxItem Content="50%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  419. <ComboBoxItem Content="75%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  420. <ComboBoxItem Content="100%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  421. </ComboBox>
  422. <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="10,0,23,0"
  423. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" IsReadOnly="True">
  424. <TextBox.Style>
  425. <Style TargetType="TextBox">
  426. <Style.Setters>
  427. <Setter Property="TextBox.Text">
  428. <Setter.Value>
  429. <MultiBinding StringFormat="P0">
  430. <Binding ElementName="OpacitySlider" Path="Value"></Binding>
  431. </MultiBinding>
  432. </Setter.Value>
  433. </Setter>
  434. </Style.Setters>
  435. </Style>
  436. </TextBox.Style>
  437. </TextBox>
  438. </Grid>
  439. </Border>
  440. </Grid>
  441. <StackPanel Margin="0 36 0 0">
  442. <cus:ToastControl x:Name="tip" Width="auto" Height="20" FontSize="12" Background="#1A477EDE" Foreground="#477EDE"/>
  443. <Button x:Name="UseAsDefaultBtn" Content="Use As Default" Margin="12,8,12,0" Width="232" Height="32" Foreground="#273C62" FontWeight="SemiBold"
  444. Background="White" BorderThickness="1" BorderBrush="#273C62" FontFamily="SegoeUI" FontSize="14" ></Button>
  445. </StackPanel>
  446. <TextBlock x:Name="noteText" Text="Note" LineHeight="20" Margin="12,30,0,0"></TextBlock>
  447. <TextBox Name="AnnotNoteText" FontSize="14" TextWrapping="Wrap" BorderBrush="#E2E3E6" Width="232" Height="96" Margin="12,10,12,0" AcceptsReturn="True">
  448. </TextBox>
  449. </StackPanel>
  450. </Grid>
  451. </UserControl>