FreetextAnnotProperty.xaml 35 KB

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