FreetextAnnotProperty.xaml 35 KB

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