FreetextAnnotProperty.xaml 31 KB

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