FreetextAnnotProperty.xaml 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. <UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.FreetextAnnotProperty"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
  7. xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
  8. xmlns:cusColor="clr-namespace:PDF_Office.CustomControl.CompositeControl"
  9. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:prism="http://prismlibrary.com/"
  11. prism:ViewModelLocator.AutoWireViewModel="True"
  12. xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
  13. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  14. mc:Ignorable="d"
  15. d:DesignHeight="850" d:DesignWidth="800">
  16. <UserControl.Resources>
  17. <ResourceDictionary>
  18. <ResourceDictionary.MergedDictionaries>
  19. <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
  20. <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
  21. </ResourceDictionary.MergedDictionaries>
  22. <Convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
  23. <Convert:BoolToVisible x:Key="BoolToVisible"/>
  24. <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
  25. <Style x:Key="line1Style" TargetType="{x:Type Line}">
  26. <Setter Property="Visibility">
  27. <Setter.Value>
  28. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  29. <Binding ElementName="TextAlignLeftBtn" Path="IsChecked"/>
  30. <Binding ElementName="TextAlignCenterBtn" Path="IsChecked"/>
  31. </MultiBinding>
  32. </Setter.Value>
  33. </Setter>
  34. </Style>
  35. <Style x:Key="line2Style" TargetType="{x:Type Line}">
  36. <Setter Property="Visibility">
  37. <Setter.Value>
  38. <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
  39. <Binding ElementName="TextAlignCenterBtn" Path="IsChecked"/>
  40. <Binding ElementName="TextAlignRightBtn" Path="IsChecked"/>
  41. </MultiBinding>
  42. </Setter.Value>
  43. </Setter>
  44. </Style>
  45. <DataTemplate x:Key="FontStyleData">
  46. <Grid >
  47. <TextBlock Text="{Binding mFontStyleName}" Foreground="Black"/>
  48. </Grid>
  49. </DataTemplate>
  50. </ResourceDictionary>
  51. </UserControl.Resources>
  52. <Grid Background="#F3F3F3">
  53. <StackPanel>
  54. <TextBlock Name="AnnotTypeTitle" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="10,8,0,0">Freetext</TextBlock>
  55. <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0"
  56. Visibility="{Binding BasicVm.IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
  57. >
  58. <Grid>
  59. <Border Name="FreeTextBorder" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5"
  60. Opacity="{Binding BasicVm.FillOpacity}"
  61. Background="{Binding BasicVm.FillColor}">
  62. <TextBlock Name="SampleText"
  63. Foreground="{Binding FontVm.FontColor}"
  64. FontFamily="{Binding FontVm.CurrentFontFamily.ValueStr}"
  65. FontWeight="{Binding FontVm.FontWeightItem}"
  66. FontStyle="{Binding FontVm.FontStyleItem}"
  67. FontSize="{Binding FontVm.CurrentFontSize.Value}" Opacity="{Binding BasicVm.FillOpacity}"
  68. Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center">
  69. </TextBlock>
  70. </Border>
  71. <Path Name="UnderlinePath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,51,0,0" Visibility="Collapsed">
  72. <Path.Data>
  73. <LineGeometry StartPoint="0,0" EndPoint="62,0"></LineGeometry>
  74. </Path.Data>
  75. </Path>
  76. <Path Name="StrikeoutPath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,40,0,0" Visibility="Collapsed">
  77. <Path.Data>
  78. <LineGeometry StartPoint="0,0" EndPoint="62,0"></LineGeometry>
  79. </Path.Data>
  80. </Path>
  81. <Path Name="SquigglyPath" HorizontalAlignment="Center" StrokeThickness="2" Margin="0,51,0,0" Visibility="Collapsed">
  82. </Path>
  83. </Grid>
  84. </Border>
  85. <Border
  86. Height="32"
  87. Margin="15,8,15,18"
  88. BorderBrush="#E2E3E6"
  89. BorderThickness="0">
  90. <Grid>
  91. <Grid.ColumnDefinitions>
  92. <ColumnDefinition/>
  93. <ColumnDefinition Width="auto"/>
  94. </Grid.ColumnDefinitions>
  95. <CompositeControl:CustomComboControl
  96. x:Name="ComBoxPresetFont"
  97. Width="188"
  98. Height="32"
  99. HorizontalAlignment="Left"
  100. IsValueContent="True"
  101. ItemSource="{Binding FontVm.PresetFontItems,Mode=OneWay}"
  102. SelectedItems="{Binding FontVm.CurrentPresetFont, Mode=TwoWay}">
  103. <i:Interaction.Triggers>
  104. <i:EventTrigger EventName="ValueChanged">
  105. <i:InvokeCommandAction Command="{Binding SelectedPresetFontCommand}"/>
  106. </i:EventTrigger>
  107. </i:Interaction.Triggers>
  108. </CompositeControl:CustomComboControl>
  109. <Button Grid.Column="1"
  110. Width="32"
  111. Height="32"
  112. HorizontalAlignment="Left" Command="{Binding CustomFontStyleCommand}"
  113. Style="{StaticResource btn.sec}">
  114. <Path
  115. Width="16"
  116. Height="16"
  117. 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"
  118. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  119. </Button>
  120. </Grid>
  121. </Border>
  122. <StackPanel Margin="15,0,15,0">
  123. <TextBlock
  124. Margin="0,0,0,10"
  125. Style="{StaticResource PropertyHeaderLv2}"
  126. Text="文本" />
  127. <StackPanel>
  128. <CompositeControl:CustomComboControl
  129. x:Name="FontFamilyBox"
  130. Height="32"
  131. IsValueContent="True"
  132. ItemSource="{Binding FontVm.FontFamilyItems,Mode=OneWay}"
  133. SelectedItems="{Binding FontVm.CurrentFontFamily, Mode=TwoWay}" >
  134. <i:Interaction.Triggers>
  135. <i:EventTrigger EventName="ValueChanged">
  136. <i:InvokeCommandAction Command="{Binding FontFamilyChangedCommand}"/>
  137. </i:EventTrigger>
  138. </i:Interaction.Triggers>
  139. </CompositeControl:CustomComboControl>
  140. <Grid Margin="0,8">
  141. <CompositeControl:CustomComboControl
  142. x:Name="FontStyleBox"
  143. Width="110"
  144. Height="32"
  145. HorizontalAlignment="Left"
  146. IsValueContent="True"
  147. ItemSource="{Binding FontVm.FontStyleItems,Mode=OneWay}"
  148. SelectedItems="{Binding FontVm.CurrrentFontWeightStyle, Mode=TwoWay}">
  149. <i:Interaction.Triggers>
  150. <i:EventTrigger EventName="ValueChanged">
  151. <i:InvokeCommandAction Command="{Binding FontStyleWeightChangedCommand}"/>
  152. </i:EventTrigger>
  153. </i:Interaction.Triggers>
  154. </CompositeControl:CustomComboControl>
  155. <CompositeControl:CustomComboControl
  156. x:Name="FontSizeBox"
  157. Width="110"
  158. Height="32"
  159. HorizontalAlignment="Right"
  160. SelectedItems="{Binding FontVm.CurrentFontSize, Mode=TwoWay}" >
  161. <i:Interaction.Triggers>
  162. <i:EventTrigger EventName="ValueChanged">
  163. <i:InvokeCommandAction Command="{Binding FontSizeChangedCommand}"/>
  164. </i:EventTrigger>
  165. </i:Interaction.Triggers>
  166. </CompositeControl:CustomComboControl>
  167. </Grid>
  168. <Grid>
  169. <StackPanel Orientation="Horizontal">
  170. <RadioButton
  171. x:Name="TextAlignLeftBtn"
  172. Width="32"
  173. Height="32"
  174. VerticalContentAlignment="Center"
  175. Background="Transparent"
  176. Foreground="#616469"
  177. GroupName="TextAlign"
  178. IsChecked="True"
  179. Style="{DynamicResource GreyBgRadioBtnStyle}"
  180. Tag="AlignLeft">
  181. <RadioButton.Content>
  182. <Grid Width="32" Height="32">
  183. <Canvas Margin="5,10,0,0">
  184. <Rectangle
  185. Canvas.Top="0.25"
  186. Width="14"
  187. Height="1.5"
  188. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  189. StrokeThickness="1.5" />
  190. <Rectangle
  191. Canvas.Top="4.25"
  192. Width="8"
  193. Height="1.5"
  194. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  195. StrokeThickness="1.5" />
  196. <Rectangle
  197. Canvas.Top="12.25"
  198. Width="8"
  199. Height="1.5"
  200. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  201. StrokeThickness="1.5" />
  202. <Rectangle
  203. Canvas.Top="8.25"
  204. Width="14"
  205. Height="1.5"
  206. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  207. StrokeThickness="1.5" />
  208. </Canvas>
  209. </Grid>
  210. </RadioButton.Content>
  211. <i:Interaction.Triggers>
  212. <i:EventTrigger EventName="Checked">
  213. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignLeftBtn, Path=Tag}" />
  214. </i:EventTrigger>
  215. </i:Interaction.Triggers>
  216. </RadioButton>
  217. <RadioButton
  218. x:Name="TextAlignCenterBtn"
  219. Width="32"
  220. Height="32"
  221. Margin="8,0"
  222. VerticalContentAlignment="Center"
  223. Background="Transparent"
  224. Foreground="#616469"
  225. GroupName="TextAlign"
  226. Style="{DynamicResource GreyBgRadioBtnStyle}"
  227. Tag="AlignCenter">
  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=TextAlignCenterBtn, Path=Foreground}"
  236. StrokeThickness="1.5" />
  237. <Rectangle
  238. Canvas.Left="3"
  239. Canvas.Top="4.25"
  240. Width="8"
  241. Height="1.5"
  242. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  243. StrokeThickness="1.5" />
  244. <Rectangle
  245. Canvas.Left="3"
  246. Canvas.Top="12.25"
  247. Width="8"
  248. Height="1.5"
  249. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  250. StrokeThickness="1.5" />
  251. <Rectangle
  252. Canvas.Top="8.25"
  253. Width="14"
  254. Height="1.5"
  255. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  256. StrokeThickness="1.5" />
  257. </Canvas>
  258. </Grid>
  259. </RadioButton.Content>
  260. <i:Interaction.Triggers>
  261. <i:EventTrigger EventName="Checked">
  262. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignCenterBtn, Path=Tag}" />
  263. </i:EventTrigger>
  264. </i:Interaction.Triggers>
  265. </RadioButton>
  266. <RadioButton
  267. x:Name="TextAlignRightBtn"
  268. Grid.Column="2"
  269. Width="32"
  270. Height="32"
  271. VerticalContentAlignment="Center"
  272. Background="Transparent"
  273. Foreground="#616469"
  274. GroupName="TextAlign"
  275. Style="{DynamicResource GreyBgRadioBtnStyle}"
  276. Tag="AlignRight">
  277. <RadioButton.Content>
  278. <Grid Width="32" Height="32">
  279. <Canvas Margin="5,10,0,0">
  280. <Rectangle
  281. Canvas.Top="0.25"
  282. Width="14"
  283. Height="1.5"
  284. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  285. StrokeThickness="1.5" />
  286. <Rectangle
  287. Canvas.Left="6"
  288. Canvas.Top="4.25"
  289. Width="8"
  290. Height="1.5"
  291. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  292. StrokeThickness="1.5" />
  293. <Rectangle
  294. Canvas.Left="6"
  295. Canvas.Top="12.25"
  296. Width="8"
  297. Height="1.5"
  298. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  299. StrokeThickness="1.5" />
  300. <Rectangle
  301. Canvas.Top="8.25"
  302. Width="14"
  303. Height="1.5"
  304. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  305. StrokeThickness="1.5" />
  306. </Canvas>
  307. </Grid>
  308. </RadioButton.Content>
  309. <i:Interaction.Triggers>
  310. <i:EventTrigger EventName="Checked">
  311. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignRightBtn, Path=Tag}" />
  312. </i:EventTrigger>
  313. </i:Interaction.Triggers>
  314. </RadioButton>
  315. <RadioButton
  316. x:Name="TextAlignBtn"
  317. Grid.Column="3"
  318. Width="32"
  319. Height="32"
  320. Margin="8,0"
  321. VerticalContentAlignment="Center"
  322. Background="Transparent"
  323. Foreground="#616469"
  324. GroupName="TextAlign"
  325. Style="{DynamicResource GreyBgRadioBtnStyle}"
  326. Tag="Justify">
  327. <RadioButton.Content>
  328. <Grid Width="32" Height="32">
  329. <Canvas Margin="5,10,0,0">
  330. <Rectangle
  331. Canvas.Top="0.25"
  332. Width="14"
  333. Height="1.5"
  334. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  335. StrokeThickness="1.5" />
  336. <Rectangle
  337. Canvas.Top="8.25"
  338. Width="14"
  339. Height="1.5"
  340. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  341. StrokeThickness="1.5" />
  342. <Rectangle
  343. Canvas.Top="4.25"
  344. Width="14"
  345. Height="1.5"
  346. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  347. StrokeThickness="1.5" />
  348. <Rectangle
  349. Canvas.Top="12.25"
  350. Width="14"
  351. Height="1.5"
  352. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  353. StrokeThickness="1.5" />
  354. </Canvas>
  355. </Grid>
  356. </RadioButton.Content>
  357. <i:Interaction.Triggers>
  358. <i:EventTrigger EventName="Checked">
  359. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignBtn, Path=Tag}" />
  360. </i:EventTrigger>
  361. </i:Interaction.Triggers>
  362. </RadioButton>
  363. </StackPanel>
  364. <cusColor:ColorContent
  365. x:Name="FontColorBox"
  366. Width="56"
  367. HorizontalAlignment="Right"
  368. ShowColorList="Collapsed"
  369. UIColor="{Binding FontVm.CurrentFontColor,Mode=OneWay}"
  370. >
  371. <i:Interaction.Triggers>
  372. <i:EventTrigger EventName="SelectedColorInvoke">
  373. <i:InvokeCommandAction Command="{Binding SelectedColorCommand}" CommandParameter="{Binding ElementName=FontColorBox,Path=SelectedColor}"/>
  374. </i:EventTrigger>
  375. </i:Interaction.Triggers>
  376. </cusColor:ColorContent>
  377. </Grid>
  378. </StackPanel>
  379. </StackPanel>
  380. <Grid Margin="15,18,15,0">
  381. <Grid.RowDefinitions>
  382. <RowDefinition Height="auto"/>
  383. <RowDefinition/>
  384. </Grid.RowDefinitions>
  385. <TextBlock Text="Fill" VerticalAlignment="Center"/>
  386. <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"
  387. InitValue="{Binding BasicVm.FillOpacity,Mode=OneWay}"
  388. Visibility="{Binding BasicVm.IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
  389. >
  390. <i:Interaction.Triggers>
  391. <i:EventTrigger EventName="SelectedValueChanged">
  392. <i:InvokeCommandAction Command="{Binding SelectedOpacityValueCommand}" CommandParameter="{Binding ElementName=layerThick,Path=Value}"/>
  393. </i:EventTrigger>
  394. </i:Interaction.Triggers>
  395. </CompositeControl:SlidContent>
  396. <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor"
  397. UIColor="{Binding BasicVm.CurrentFillColor,Mode=OneWay}">
  398. <i:Interaction.Triggers>
  399. <i:EventTrigger EventName="SelectedColorInvoke">
  400. <i:InvokeCommandAction Command="{Binding SelectedFillColorCommand}" CommandParameter="{Binding ElementName=cusColor,Path=SelectedColor}"/>
  401. </i:EventTrigger>
  402. </i:Interaction.Triggers>
  403. </CompositeControl:ColorContent>
  404. </Grid>
  405. <StackPanel Visibility="{Binding IsFillFreeTextAnnot,Converter={StaticResource BoolToVisible}}">
  406. <TextBlock Margin="0,8,0,8" Text="Date Type" Foreground="{StaticResource color.sys.text.neutral.lv2}" />
  407. <CompositeControl:CustomComboControl
  408. x:Name="DateTimeBox"
  409. Width="228"
  410. Height="32"
  411. HorizontalAlignment="Left"
  412. IsValueContent="True"
  413. ItemSource="{Binding DateFormatItems,Mode=OneWay}"
  414. SelectedItems="{Binding CurrrentDateFormat, Mode=TwoWay}">
  415. <i:Interaction.Triggers>
  416. <i:EventTrigger EventName="ValueChanged">
  417. <i:InvokeCommandAction Command="{Binding DateFormatChangedCommand}"/>
  418. </i:EventTrigger>
  419. </i:Interaction.Triggers>
  420. </CompositeControl:CustomComboControl>
  421. <CheckBox x:Name="isShowTime" Margin="0,16,0,0" Content="Show Time" IsChecked="{Binding IsCheckedTime,Mode=TwoWay}"
  422. Command="{Binding ShowTimeCheckedChnagedCommand}"
  423. >
  424. </CheckBox>
  425. </StackPanel>
  426. <!--MVP不上-->
  427. <TextBlock x:Name="thicknessText" Visibility="Collapsed" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="14" LineHeight="20" Margin="12,14,0,0" >Thickness</TextBlock>
  428. <Grid Visibility="Collapsed">
  429. <Grid.ColumnDefinitions>
  430. <ColumnDefinition Width="*"></ColumnDefinition>
  431. <ColumnDefinition Width="auto"></ColumnDefinition>
  432. </Grid.ColumnDefinitions>
  433. <Slider Name="ThicknessSlider" VerticalAlignment="Center" Margin="12,0,0,0" Width="148" Minimum="0" Maximum="24" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
  434. Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True" >
  435. <Slider.Resources>
  436. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  437. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  438. </Slider.Resources>
  439. </Slider>
  440. <Border Grid.Column="1" BorderBrush="#E2E3E6" Width="80" Height="32" Margin="0,0,11,0" BorderThickness="0">
  441. <Grid>
  442. <ComboBox Name="ThicknessBox" BorderThickness="1" Padding="10" Background="Transparent" BorderBrush="#FFE2E3E6"
  443. MaxDropDownHeight="200">
  444. <ComboBox.ItemContainerStyle>
  445. <Style TargetType="{x:Type ComboBoxItem}">
  446. <Setter Property="Padding" Value="10 0 0 0"/>
  447. </Style>
  448. </ComboBox.ItemContainerStyle>
  449. <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  450. <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  451. <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  452. <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  453. <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  454. <ComboBoxItem Content="15" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  455. <ComboBoxItem Content="18" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  456. <ComboBoxItem Content="21" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  457. <ComboBoxItem Content="24" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  458. </ComboBox>
  459. <TextBox Name="ThicknessText" Background="White" FontFamily="Segoe UI" FontSize="14" Height="20" Margin="10,0,35,0" IsReadOnly="True"
  460. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" >
  461. </TextBox>
  462. </Grid>
  463. </Border>
  464. </Grid>
  465. <StackPanel Visibility="Collapsed" Orientation="Horizontal" Margin="0,20,0,0">
  466. <RadioButton x:Name="BtnSolid" Tag="Solid" GroupName="LineMode"
  467. Width="105" Height="32" Margin="0,0,10,0" Foreground="#616469"
  468. VerticalContentAlignment="Center" Background="Transparent"
  469. Style="{DynamicResource GreyBgRadioBtnStyle}">
  470. <RadioButton.Content>
  471. <Line X1="10" Y1="5" X2="90" Y2="5" Stroke="Black" StrokeThickness="2" />
  472. </RadioButton.Content>
  473. <i:Interaction.Triggers>
  474. <i:EventTrigger EventName="Checked">
  475. <i:InvokeCommandAction Command="{Binding LineModeCheckedCommand}" CommandParameter="{Binding ElementName=BtnSolid, Path=Tag}" />
  476. </i:EventTrigger>
  477. </i:Interaction.Triggers>
  478. </RadioButton>
  479. <RadioButton x:Name="BtnDashed" Tag="Dashed" GroupName="LineMode"
  480. Width="105" Height="32" Margin="0,0" Foreground="#616469"
  481. VerticalContentAlignment="Center" Background="Transparent"
  482. Style="{DynamicResource GreyBgRadioBtnStyle}">
  483. <RadioButton.Content>
  484. <Line X1="10" Y1="5" X2="90" Y2="5" Stroke="Black" StrokeThickness="2" StrokeDashArray="2"/>
  485. </RadioButton.Content>
  486. <i:Interaction.Triggers>
  487. <i:EventTrigger EventName="Checked">
  488. <i:InvokeCommandAction Command="{Binding LineModeCheckedCommand}" CommandParameter="{Binding ElementName=BtnDashed, Path=Tag}" />
  489. </i:EventTrigger>
  490. </i:Interaction.Triggers>
  491. </RadioButton>
  492. </StackPanel>
  493. </StackPanel>
  494. </Grid>
  495. </UserControl>