FreetextAnnotProperty.xaml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. <UserControl
  2. x:Class="PDF_Master.Views.PropertyPanel.AnnotPanel.FreetextAnnotProperty"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:CompositeControl="clr-namespace:PDF_Master.CustomControl.CompositeControl"
  6. xmlns:Convert="clr-namespace:PDF_Master.DataConvert"
  7. xmlns:annotpanel="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
  8. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  9. xmlns:cusColor="clr-namespace:PDF_Master.CustomControl.CompositeControl"
  10. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  11. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  12. xmlns:local="clr-namespace:PDF_Master.Views.PropertyPanel.AnnotPanel"
  13. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  14. xmlns:prism="http://prismlibrary.com/"
  15. d:DataContext="{d:DesignInstance Type=annotpanel:FreetextAnnotPropertyViewModel}"
  16. d:DesignHeight="850"
  17. d:DesignWidth="260"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. Background="{StaticResource color.sys.layout.mg}"
  20. mc:Ignorable="d">
  21. <UserControl.Resources>
  22. <ResourceDictionary>
  23. <ResourceDictionary.MergedDictionaries>
  24. <ResourceDictionary Source="../../../Styles/SliderStyle.xaml" />
  25. <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml" />
  26. </ResourceDictionary.MergedDictionaries>
  27. <Convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert" />
  28. <Convert:BoolToVisible x:Key="BoolToVisible" />
  29. <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert" />
  30. <Convert:TextAlignToCheckedConverter x:Key="TextAlignToCheckedConverter" />
  31. <Style x:Key="line1Style" TargetType="{x:Type Line}">
  32. <Setter Property="Visibility">
  33. <Setter.Value>
  34. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  35. <Binding ElementName="TextAlignLeftBtn" Path="IsChecked" />
  36. <Binding ElementName="TextAlignCenterBtn" Path="IsChecked" />
  37. </MultiBinding>
  38. </Setter.Value>
  39. </Setter>
  40. </Style>
  41. <Style x:Key="line2Style" TargetType="{x:Type Line}">
  42. <Setter Property="Visibility">
  43. <Setter.Value>
  44. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  45. <Binding ElementName="TextAlignCenterBtn" Path="IsChecked" />
  46. <Binding ElementName="TextAlignRightBtn" Path="IsChecked" />
  47. </MultiBinding>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. <DataTemplate x:Key="FontStyleData">
  52. <Grid>
  53. <TextBlock Foreground="Black" Text="{Binding mFontStyleName}" />
  54. </Grid>
  55. </DataTemplate>
  56. </ResourceDictionary>
  57. </UserControl.Resources>
  58. <Grid>
  59. <StackPanel Margin="16,0">
  60. <TextBlock
  61. Name="AnnotTypeTitle"
  62. Margin="0,14"
  63. HorizontalAlignment="Left"
  64. FontFamily="Segoe UI"
  65. FontSize="14"
  66. FontWeight="SemiBold"
  67. LineHeight="24"
  68. Text="{Binding T_Title}" />
  69. <Border
  70. Width="228"
  71. Height="100"
  72. Background="White"
  73. BorderBrush="#DDDDDD"
  74. BorderThickness="1"
  75. CornerRadius="2"
  76. Visibility="{Binding BasicVm.IsMultiSelected, Converter={StaticResource InvertBoolToVisibleConvert}}">
  77. <Grid>
  78. <Border
  79. Name="FreeTextBorder"
  80. Padding="5"
  81. HorizontalAlignment="Center"
  82. VerticalAlignment="Center"
  83. Background="{Binding BasicVm.FillColor}"
  84. Opacity="{Binding BasicVm.FillOpacity}">
  85. <TextBlock
  86. Name="SampleText"
  87. HorizontalAlignment="Center"
  88. VerticalAlignment="Center"
  89. FontFamily="{Binding FontVm.CurrentFontFamily.ValueStr}"
  90. FontSize="{Binding FontVm.CurrentFontSize.Value}"
  91. FontStyle="{Binding FontVm.FontStyleItem}"
  92. FontWeight="{Binding FontVm.FontWeightItem}"
  93. Foreground="{Binding FontVm.FontColor}"
  94. Opacity="{Binding BasicVm.FillOpacity}"
  95. Text="Sample" />
  96. </Border>
  97. <Path
  98. Name="UnderlinePath"
  99. Margin="0,51,0,0"
  100. HorizontalAlignment="Center"
  101. StrokeThickness="2"
  102. Visibility="Collapsed">
  103. <Path.Data>
  104. <LineGeometry StartPoint="0,0" EndPoint="62,0" />
  105. </Path.Data>
  106. </Path>
  107. <Path
  108. Name="StrikeoutPath"
  109. Margin="0,40,0,0"
  110. HorizontalAlignment="Center"
  111. StrokeThickness="2"
  112. Visibility="Collapsed">
  113. <Path.Data>
  114. <LineGeometry StartPoint="0,0" EndPoint="62,0" />
  115. </Path.Data>
  116. </Path>
  117. <Path
  118. Name="SquigglyPath"
  119. Margin="0,51,0,0"
  120. HorizontalAlignment="Center"
  121. StrokeThickness="2"
  122. Visibility="Collapsed" />
  123. </Grid>
  124. </Border>
  125. <Border
  126. Height="32"
  127. Margin="0,8,0,18"
  128. BorderBrush="#E2E3E6"
  129. BorderThickness="0">
  130. <Grid>
  131. <Grid.ColumnDefinitions>
  132. <ColumnDefinition />
  133. <ColumnDefinition Width="auto" />
  134. </Grid.ColumnDefinitions>
  135. <CompositeControl:CustomComboControl
  136. x:Name="ComBoxPresetFont"
  137. Title="{Binding Title,Mode=TwoWay,NotifyOnSourceUpdated=True}"
  138. Width="188"
  139. Height="32"
  140. HorizontalAlignment="Left"
  141. IsValueContent="True"
  142. ItemSource="{Binding FontVm.PresetFontItems, Mode=OneWay}"
  143. SelectedIndex="{Binding FontVm.PresetFontSelectedIndex, Mode=TwoWay}"
  144. SelectedItems="{Binding FontVm.CurrentPresetFont, Mode=TwoWay}">
  145. <i:Interaction.Triggers>
  146. <i:EventTrigger EventName="ValueChanged">
  147. <i:InvokeCommandAction Command="{Binding SelectedPresetFontCommand}" />
  148. </i:EventTrigger>
  149. </i:Interaction.Triggers>
  150. </CompositeControl:CustomComboControl>
  151. <Button
  152. Grid.Column="1"
  153. Width="32"
  154. Height="32"
  155. HorizontalAlignment="Left"
  156. Command="{Binding CustomFontStyleCommand}"
  157. Style="{StaticResource btn.sec}">
  158. <Path
  159. Width="16"
  160. Height="16"
  161. Data="M4 8C4 8.82843 3.32843 9.5 2.5 9.5C1.67157 9.5 1 8.82843 1 8C1 7.17157 1.67157 6.5 2.5 6.5C3.32843 6.5 4 7.17157 4 8ZM9.3999 8C9.3999 8.82843 8.72833 9.5 7.8999 9.5C7.07148 9.5 6.3999 8.82843 6.3999 8C6.3999 7.17157 7.07148 6.5 7.8999 6.5C8.72833 6.5 9.3999 7.17157 9.3999 8ZM13.5 9.5C14.3284 9.5 15 8.82843 15 8C15 7.17157 14.3284 6.5 13.5 6.5C12.6716 6.5 12 7.17157 12 8C12 8.82843 12.6716 9.5 13.5 9.5Z"
  162. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  163. </Button>
  164. </Grid>
  165. </Border>
  166. <StackPanel>
  167. <TextBlock
  168. Margin="0,0,0,10"
  169. FontWeight="Normal"
  170. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  171. Style="{StaticResource PropertyHeaderLv2}"
  172. Text="{Binding T_Font}" />
  173. <StackPanel>
  174. <CompositeControl:CustomComboControl
  175. x:Name="FontFamilyBox"
  176. Height="32"
  177. IsValueContent="True"
  178. ItemSource="{Binding FontVm.FontFamilyItems, Mode=OneWay}"
  179. SelectedIndex="{Binding FontVm.FontFamilySelectedIndex, Mode=TwoWay}"
  180. SelectedItems="{Binding FontVm.CurrentFontFamily, Mode=TwoWay}">
  181. <i:Interaction.Triggers>
  182. <i:EventTrigger EventName="ValueChanged">
  183. <i:InvokeCommandAction Command="{Binding FontFamilyChangedCommand}" />
  184. </i:EventTrigger>
  185. </i:Interaction.Triggers>
  186. </CompositeControl:CustomComboControl>
  187. <Grid Margin="0,8">
  188. <CompositeControl:CustomComboControl
  189. x:Name="FontStyleBox"
  190. Width="110"
  191. Height="32"
  192. HorizontalAlignment="Left"
  193. IsValueContent="True"
  194. ItemSource="{Binding FontVm.FontStyleItems, Mode=OneWay}"
  195. SelectedIndex="{Binding FontVm.FontStyleSelectedIndex, Mode=TwoWay}"
  196. SelectedItems="{Binding FontVm.CurrrentFontWeightStyle, Mode=TwoWay}">
  197. <i:Interaction.Triggers>
  198. <i:EventTrigger EventName="ValueChanged">
  199. <i:InvokeCommandAction Command="{Binding FontStyleWeightChangedCommand}" />
  200. </i:EventTrigger>
  201. </i:Interaction.Triggers>
  202. </CompositeControl:CustomComboControl>
  203. <CompositeControl:CustomComboControl
  204. x:Name="FontSizeBox"
  205. Width="110"
  206. Height="32"
  207. HorizontalAlignment="Right"
  208. SelectedItems="{Binding FontVm.CurrentFontSize, Mode=TwoWay}">
  209. <i:Interaction.Triggers>
  210. <i:EventTrigger EventName="ValueChanged">
  211. <i:InvokeCommandAction Command="{Binding FontSizeChangedCommand}" />
  212. </i:EventTrigger>
  213. </i:Interaction.Triggers>
  214. </CompositeControl:CustomComboControl>
  215. </Grid>
  216. <Grid>
  217. <StackPanel Orientation="Horizontal">
  218. <RadioButton
  219. x:Name="TextAlignLeftBtn"
  220. Width="32"
  221. Height="32"
  222. VerticalContentAlignment="Center"
  223. Background="Transparent"
  224. Command="{Binding TextAlignCheckedCommand}"
  225. CommandParameter="{Binding ElementName=TextAlignLeftBtn, Path=Tag}"
  226. Foreground="#616469"
  227. GroupName="TextAlign"
  228. IsChecked="{Binding FontVm.StrTextAlign, Mode=OneWay, Converter={StaticResource TextAlignToCheckedConverter}, ConverterParameter=AlignLeft}"
  229. Style="{DynamicResource GreyBgRadioBtnStyle}"
  230. Tag="AlignLeft">
  231. <RadioButton.Content>
  232. <Grid Width="32" Height="32">
  233. <Canvas Margin="5,10,0,0">
  234. <Rectangle
  235. Canvas.Top="0.25"
  236. Width="14"
  237. Height="1.5"
  238. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  239. StrokeThickness="1.5" />
  240. <Rectangle
  241. Canvas.Top="4.25"
  242. Width="8"
  243. Height="1.5"
  244. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  245. StrokeThickness="1.5" />
  246. <Rectangle
  247. Canvas.Top="12.25"
  248. Width="8"
  249. Height="1.5"
  250. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  251. StrokeThickness="1.5" />
  252. <Rectangle
  253. Canvas.Top="8.25"
  254. Width="14"
  255. Height="1.5"
  256. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  257. StrokeThickness="1.5" />
  258. </Canvas>
  259. </Grid>
  260. </RadioButton.Content>
  261. </RadioButton>
  262. <RadioButton
  263. x:Name="TextAlignCenterBtn"
  264. Width="32"
  265. Height="32"
  266. Margin="8,0"
  267. VerticalContentAlignment="Center"
  268. Background="Transparent"
  269. Command="{Binding TextAlignCheckedCommand}"
  270. CommandParameter="{Binding ElementName=TextAlignCenterBtn, Path=Tag}"
  271. Foreground="#616469"
  272. GroupName="TextAlign"
  273. IsChecked="{Binding FontVm.StrTextAlign, Mode=OneWay, Converter={StaticResource TextAlignToCheckedConverter}, ConverterParameter=AlignCenter}"
  274. Style="{DynamicResource GreyBgRadioBtnStyle}"
  275. Tag="AlignCenter">
  276. <RadioButton.Content>
  277. <Grid Width="32" Height="32">
  278. <Canvas Margin="5,10,0,0">
  279. <Rectangle
  280. Canvas.Top="0.25"
  281. Width="14"
  282. Height="1.5"
  283. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  284. StrokeThickness="1.5" />
  285. <Rectangle
  286. Canvas.Left="3"
  287. Canvas.Top="4.25"
  288. Width="8"
  289. Height="1.5"
  290. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  291. StrokeThickness="1.5" />
  292. <Rectangle
  293. Canvas.Left="3"
  294. Canvas.Top="12.25"
  295. Width="8"
  296. Height="1.5"
  297. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  298. StrokeThickness="1.5" />
  299. <Rectangle
  300. Canvas.Top="8.25"
  301. Width="14"
  302. Height="1.5"
  303. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  304. StrokeThickness="1.5" />
  305. </Canvas>
  306. </Grid>
  307. </RadioButton.Content>
  308. </RadioButton>
  309. <RadioButton
  310. x:Name="TextAlignRightBtn"
  311. Grid.Column="2"
  312. Width="32"
  313. Height="32"
  314. VerticalContentAlignment="Center"
  315. Background="Transparent"
  316. Command="{Binding TextAlignCheckedCommand}"
  317. CommandParameter="{Binding ElementName=TextAlignRightBtn, Path=Tag}"
  318. Foreground="#616469"
  319. GroupName="TextAlign"
  320. IsChecked="{Binding FontVm.StrTextAlign, Mode=OneWay, Converter={StaticResource TextAlignToCheckedConverter}, ConverterParameter=AlignRight}"
  321. Style="{DynamicResource GreyBgRadioBtnStyle}"
  322. Tag="AlignRight">
  323. <RadioButton.Content>
  324. <Grid Width="32" Height="32">
  325. <Canvas Margin="5,10,0,0">
  326. <Rectangle
  327. Canvas.Top="0.25"
  328. Width="14"
  329. Height="1.5"
  330. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  331. StrokeThickness="1.5" />
  332. <Rectangle
  333. Canvas.Left="6"
  334. Canvas.Top="4.25"
  335. Width="8"
  336. Height="1.5"
  337. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  338. StrokeThickness="1.5" />
  339. <Rectangle
  340. Canvas.Left="6"
  341. Canvas.Top="12.25"
  342. Width="8"
  343. Height="1.5"
  344. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  345. StrokeThickness="1.5" />
  346. <Rectangle
  347. Canvas.Top="8.25"
  348. Width="14"
  349. Height="1.5"
  350. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  351. StrokeThickness="1.5" />
  352. </Canvas>
  353. </Grid>
  354. </RadioButton.Content>
  355. </RadioButton>
  356. <RadioButton
  357. x:Name="TextAlignBtn"
  358. Grid.Column="3"
  359. Width="32"
  360. Height="32"
  361. Margin="8,0"
  362. VerticalContentAlignment="Center"
  363. Background="Transparent"
  364. Command="{Binding TextAlignCheckedCommand}"
  365. CommandParameter="{Binding ElementName=TextAlignBtn, Path=Tag}"
  366. Foreground="#616469"
  367. GroupName="TextAlign"
  368. IsChecked="{Binding FontVm.StrTextAlign, Mode=OneWay, Converter={StaticResource TextAlignToCheckedConverter}, ConverterParameter=Justify}"
  369. Style="{DynamicResource GreyBgRadioBtnStyle}"
  370. Tag="Justify"
  371. Visibility="Collapsed">
  372. <RadioButton.Content>
  373. <Grid Width="32" Height="32">
  374. <Canvas Margin="5,10,0,0">
  375. <Rectangle
  376. Canvas.Top="0.25"
  377. Width="14"
  378. Height="1.5"
  379. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  380. StrokeThickness="1.5" />
  381. <Rectangle
  382. Canvas.Top="8.25"
  383. Width="14"
  384. Height="1.5"
  385. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  386. StrokeThickness="1.5" />
  387. <Rectangle
  388. Canvas.Top="4.25"
  389. Width="14"
  390. Height="1.5"
  391. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  392. StrokeThickness="1.5" />
  393. <Rectangle
  394. Canvas.Top="12.25"
  395. Width="14"
  396. Height="1.5"
  397. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  398. StrokeThickness="1.5" />
  399. </Canvas>
  400. </Grid>
  401. </RadioButton.Content>
  402. </RadioButton>
  403. </StackPanel>
  404. <cusColor:ColorContent
  405. x:Name="FontColorBox"
  406. Width="56"
  407. HorizontalAlignment="Right"
  408. ShowColorList="Collapsed"
  409. UIColor="{Binding FontVm.CurrentFontColor, Mode=OneWay}">
  410. <i:Interaction.Triggers>
  411. <i:EventTrigger EventName="SelectedColorInvoke">
  412. <i:InvokeCommandAction Command="{Binding SelectedColorCommand}" CommandParameter="{Binding ElementName=FontColorBox, Path=SelectedColor}" />
  413. </i:EventTrigger>
  414. </i:Interaction.Triggers>
  415. </cusColor:ColorContent>
  416. </Grid>
  417. </StackPanel>
  418. </StackPanel>
  419. <Grid Margin="0,18,0,0">
  420. <Grid.RowDefinitions>
  421. <RowDefinition Height="auto" />
  422. <RowDefinition />
  423. </Grid.RowDefinitions>
  424. <TextBlock
  425. VerticalAlignment="Center"
  426. FontWeight="Normal"
  427. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  428. Text="{Binding T_Fill}" />
  429. <CompositeControl:SlidContent
  430. x:Name="layerThick"
  431. HorizontalAlignment="Right"
  432. InitValue="{Binding BasicVm.FillOpacity, Mode=OneWay}"
  433. Visibility="{Binding BasicVm.IsMultiSelected, Converter={StaticResource InvertBoolToVisibleConvert}}">
  434. <i:Interaction.Triggers>
  435. <i:EventTrigger EventName="SelectedValueChanged">
  436. <i:InvokeCommandAction Command="{Binding SelectedOpacityValueCommand}" CommandParameter="{Binding ElementName=layerThick, Path=Value}" />
  437. </i:EventTrigger>
  438. </i:Interaction.Triggers>
  439. </CompositeControl:SlidContent>
  440. <CompositeControl:ColorContent
  441. x:Name="cusColor"
  442. Grid.Row="1"
  443. Margin="0,8,0,0"
  444. ColorType="Fill"
  445. ItemSource="{Binding BasicVm.FillColorItems}"
  446. UIColor="{Binding BasicVm.CurrentFillColor, Mode=TwoWay}">
  447. <i:Interaction.Triggers>
  448. <i:EventTrigger EventName="SelectedColorInvoke">
  449. <i:InvokeCommandAction Command="{Binding SelectedFillColorCommand}" CommandParameter="{Binding ElementName=cusColor, Path=SelectedColor}" />
  450. </i:EventTrigger>
  451. </i:Interaction.Triggers>
  452. </CompositeControl:ColorContent>
  453. </Grid>
  454. <StackPanel Visibility="{Binding IsFillFreeTextAnnot, Converter={StaticResource BoolToVisible}}">
  455. <TextBlock
  456. Margin="0,8,0,8"
  457. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  458. Text="Date Type" />
  459. <CompositeControl:CustomComboControl
  460. x:Name="DateTimeBox"
  461. Width="228"
  462. Height="32"
  463. HorizontalAlignment="Left"
  464. IsValueContent="True"
  465. ItemSource="{Binding DateFormatItems, Mode=OneWay}"
  466. SelectedItems="{Binding CurrrentDateFormat, Mode=TwoWay}">
  467. <i:Interaction.Triggers>
  468. <i:EventTrigger EventName="ValueChanged">
  469. <i:InvokeCommandAction Command="{Binding DateFormatChangedCommand}" />
  470. </i:EventTrigger>
  471. </i:Interaction.Triggers>
  472. </CompositeControl:CustomComboControl>
  473. <CheckBox
  474. x:Name="isShowTime"
  475. Margin="0,16,0,0"
  476. Command="{Binding ShowTimeCheckedChnagedCommand}"
  477. Content="Show Time"
  478. IsChecked="{Binding IsCheckedTime, Mode=TwoWay}" />
  479. </StackPanel>
  480. <!-- MVP不上 -->
  481. <TextBlock
  482. x:Name="thicknessText"
  483. Margin="12,14,0,0"
  484. FontFamily="Segoe UI Semibold"
  485. FontSize="14"
  486. FontWeight="SemiBold"
  487. LineHeight="20"
  488. Visibility="Collapsed">
  489. Thickness
  490. </TextBlock>
  491. <Grid Visibility="Collapsed">
  492. <Grid.ColumnDefinitions>
  493. <ColumnDefinition Width="*" />
  494. <ColumnDefinition Width="auto" />
  495. </Grid.ColumnDefinitions>
  496. <Slider
  497. Name="ThicknessSlider"
  498. Width="148"
  499. Margin="12,0,0,0"
  500. VerticalAlignment="Center"
  501. IsMoveToPointEnabled="True"
  502. IsSelectionRangeEnabled="True"
  503. IsSnapToTickEnabled="True"
  504. Maximum="24"
  505. Minimum="0"
  506. Style="{StaticResource RoundThumbSlider}"
  507. TickFrequency="1">
  508. <Slider.Resources>
  509. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  510. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  511. </Slider.Resources>
  512. </Slider>
  513. <Border
  514. Grid.Column="1"
  515. Width="80"
  516. Height="32"
  517. Margin="0,0,11,0"
  518. BorderBrush="#E2E3E6"
  519. BorderThickness="0">
  520. <Grid>
  521. <ComboBox
  522. Name="ThicknessBox"
  523. Padding="10"
  524. Background="Transparent"
  525. BorderBrush="#FFE2E3E6"
  526. BorderThickness="1"
  527. MaxDropDownHeight="200">
  528. <ComboBox.ItemContainerStyle>
  529. <Style TargetType="{x:Type ComboBoxItem}">
  530. <Setter Property="Padding" Value="10,0,0,0" />
  531. </Style>
  532. </ComboBox.ItemContainerStyle>
  533. <ComboBoxItem
  534. Height="32"
  535. VerticalContentAlignment="Center"
  536. Content="1"
  537. Template="{StaticResource comboxitem}" />
  538. <ComboBoxItem
  539. Height="32"
  540. VerticalContentAlignment="Center"
  541. Content="3"
  542. Template="{StaticResource comboxitem}" />
  543. <ComboBoxItem
  544. Height="32"
  545. VerticalContentAlignment="Center"
  546. Content="6"
  547. Template="{StaticResource comboxitem}" />
  548. <ComboBoxItem
  549. Height="32"
  550. VerticalContentAlignment="Center"
  551. Content="9"
  552. Template="{StaticResource comboxitem}" />
  553. <ComboBoxItem
  554. Height="32"
  555. VerticalContentAlignment="Center"
  556. Content="12"
  557. Template="{StaticResource comboxitem}" />
  558. <ComboBoxItem
  559. Height="32"
  560. VerticalContentAlignment="Center"
  561. Content="15"
  562. Template="{StaticResource comboxitem}" />
  563. <ComboBoxItem
  564. Height="32"
  565. VerticalContentAlignment="Center"
  566. Content="18"
  567. Template="{StaticResource comboxitem}" />
  568. <ComboBoxItem
  569. Height="32"
  570. VerticalContentAlignment="Center"
  571. Content="21"
  572. Template="{StaticResource comboxitem}" />
  573. <ComboBoxItem
  574. Height="32"
  575. VerticalContentAlignment="Center"
  576. Content="24"
  577. Template="{StaticResource comboxitem}" />
  578. </ComboBox>
  579. <TextBox
  580. Name="ThicknessText"
  581. Height="20"
  582. Margin="10,0,35,0"
  583. VerticalAlignment="Center"
  584. Background="White"
  585. BorderThickness="0"
  586. FontFamily="Segoe UI"
  587. FontSize="14"
  588. IsReadOnly="True"
  589. TextAlignment="Left" />
  590. </Grid>
  591. </Border>
  592. </Grid>
  593. <StackPanel
  594. Margin="0,20,0,0"
  595. Orientation="Horizontal"
  596. Visibility="Collapsed">
  597. <RadioButton
  598. x:Name="BtnSolid"
  599. Width="105"
  600. Height="32"
  601. Margin="0,0,10,0"
  602. VerticalContentAlignment="Center"
  603. Background="Transparent"
  604. Foreground="#616469"
  605. GroupName="LineMode"
  606. Style="{DynamicResource GreyBgRadioBtnStyle}"
  607. Tag="Solid">
  608. <RadioButton.Content>
  609. <Line
  610. Stroke="Black"
  611. StrokeThickness="2"
  612. X1="10"
  613. X2="90"
  614. Y1="5"
  615. Y2="5" />
  616. </RadioButton.Content>
  617. <i:Interaction.Triggers>
  618. <i:EventTrigger EventName="Checked">
  619. <i:InvokeCommandAction Command="{Binding LineModeCheckedCommand}" CommandParameter="{Binding ElementName=BtnSolid, Path=Tag}" />
  620. </i:EventTrigger>
  621. </i:Interaction.Triggers>
  622. </RadioButton>
  623. <RadioButton
  624. x:Name="BtnDashed"
  625. Width="105"
  626. Height="32"
  627. Margin="0,0"
  628. VerticalContentAlignment="Center"
  629. Background="Transparent"
  630. Foreground="#616469"
  631. GroupName="LineMode"
  632. Style="{DynamicResource GreyBgRadioBtnStyle}"
  633. Tag="Dashed">
  634. <RadioButton.Content>
  635. <Line
  636. Stroke="Black"
  637. StrokeDashArray="2"
  638. StrokeThickness="2"
  639. X1="10"
  640. X2="90"
  641. Y1="5"
  642. Y2="5" />
  643. </RadioButton.Content>
  644. <i:Interaction.Triggers>
  645. <i:EventTrigger EventName="Checked">
  646. <i:InvokeCommandAction Command="{Binding LineModeCheckedCommand}" CommandParameter="{Binding ElementName=BtnDashed, Path=Tag}" />
  647. </i:EventTrigger>
  648. </i:Interaction.Triggers>
  649. </RadioButton>
  650. </StackPanel>
  651. </StackPanel>
  652. </Grid>
  653. </UserControl>