FreetextAnnotProperty.xaml 33 KB

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