FreetextAnnotProperty.xaml 36 KB

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