FreetextAnnotProperty.xaml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  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,Mode=OneWay}"
  147. SelectedItems="{Binding FontVm.CurrrentFontWeightStyle, Mode=TwoWay}">
  148. <i:Interaction.Triggers>
  149. <i:EventTrigger EventName="ValueChanged">
  150. <i:InvokeCommandAction Command="{Binding FontStyleWeightChangedCommand}"/>
  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. <i:Interaction.Triggers>
  161. <i:EventTrigger EventName="ValueChanged">
  162. <i:InvokeCommandAction Command="{Binding FontSizeChangedCommand}"/>
  163. </i:EventTrigger>
  164. </i:Interaction.Triggers>
  165. </CompositeControl:CustomComboControl>
  166. </Grid>
  167. <Grid>
  168. <StackPanel Orientation="Horizontal">
  169. <RadioButton
  170. x:Name="TextAlignLeftBtn"
  171. Width="32"
  172. Height="32"
  173. VerticalContentAlignment="Center"
  174. Background="Transparent"
  175. Foreground="#616469"
  176. GroupName="TextAlign"
  177. IsChecked="True"
  178. Style="{DynamicResource GreyBgRadioBtnStyle}"
  179. Tag="AlignLeft">
  180. <RadioButton.Content>
  181. <Grid Width="32" Height="32">
  182. <Canvas Margin="5,10,0,0">
  183. <Rectangle
  184. Canvas.Top="0.25"
  185. Width="14"
  186. Height="1.5"
  187. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  188. StrokeThickness="1.5" />
  189. <Rectangle
  190. Canvas.Top="4.25"
  191. Width="8"
  192. Height="1.5"
  193. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  194. StrokeThickness="1.5" />
  195. <Rectangle
  196. Canvas.Top="12.25"
  197. Width="8"
  198. Height="1.5"
  199. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  200. StrokeThickness="1.5" />
  201. <Rectangle
  202. Canvas.Top="8.25"
  203. Width="14"
  204. Height="1.5"
  205. Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
  206. StrokeThickness="1.5" />
  207. </Canvas>
  208. </Grid>
  209. </RadioButton.Content>
  210. <i:Interaction.Triggers>
  211. <i:EventTrigger EventName="Checked">
  212. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignLeftBtn, Path=Tag}" />
  213. </i:EventTrigger>
  214. </i:Interaction.Triggers>
  215. </RadioButton>
  216. <RadioButton
  217. x:Name="TextAlignCenterBtn"
  218. Width="32"
  219. Height="32"
  220. Margin="8,0"
  221. VerticalContentAlignment="Center"
  222. Background="Transparent"
  223. Foreground="#616469"
  224. GroupName="TextAlign"
  225. Style="{DynamicResource GreyBgRadioBtnStyle}"
  226. Tag="AlignCenter">
  227. <RadioButton.Content>
  228. <Grid Width="32" Height="32">
  229. <Canvas Margin="5,10,0,0">
  230. <Rectangle
  231. Canvas.Top="0.25"
  232. Width="14"
  233. Height="1.5"
  234. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  235. StrokeThickness="1.5" />
  236. <Rectangle
  237. Canvas.Left="3"
  238. Canvas.Top="4.25"
  239. Width="8"
  240. Height="1.5"
  241. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  242. StrokeThickness="1.5" />
  243. <Rectangle
  244. Canvas.Left="3"
  245. Canvas.Top="12.25"
  246. Width="8"
  247. Height="1.5"
  248. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  249. StrokeThickness="1.5" />
  250. <Rectangle
  251. Canvas.Top="8.25"
  252. Width="14"
  253. Height="1.5"
  254. Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
  255. StrokeThickness="1.5" />
  256. </Canvas>
  257. </Grid>
  258. </RadioButton.Content>
  259. <i:Interaction.Triggers>
  260. <i:EventTrigger EventName="Checked">
  261. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignCenterBtn, Path=Tag}" />
  262. </i:EventTrigger>
  263. </i:Interaction.Triggers>
  264. </RadioButton>
  265. <RadioButton
  266. x:Name="TextAlignRightBtn"
  267. Grid.Column="2"
  268. Width="32"
  269. Height="32"
  270. VerticalContentAlignment="Center"
  271. Background="Transparent"
  272. Foreground="#616469"
  273. GroupName="TextAlign"
  274. Style="{DynamicResource GreyBgRadioBtnStyle}"
  275. Tag="AlignRight">
  276. <RadioButton.Content>
  277. <Grid Width="32" Height="32">
  278. <Canvas Margin="5,10,0,0">
  279. <Rectangle
  280. Canvas.Top="0.25"
  281. Width="14"
  282. Height="1.5"
  283. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  284. StrokeThickness="1.5" />
  285. <Rectangle
  286. Canvas.Left="6"
  287. Canvas.Top="4.25"
  288. Width="8"
  289. Height="1.5"
  290. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  291. StrokeThickness="1.5" />
  292. <Rectangle
  293. Canvas.Left="6"
  294. Canvas.Top="12.25"
  295. Width="8"
  296. Height="1.5"
  297. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  298. StrokeThickness="1.5" />
  299. <Rectangle
  300. Canvas.Top="8.25"
  301. Width="14"
  302. Height="1.5"
  303. Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
  304. StrokeThickness="1.5" />
  305. </Canvas>
  306. </Grid>
  307. </RadioButton.Content>
  308. <i:Interaction.Triggers>
  309. <i:EventTrigger EventName="Checked">
  310. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignRightBtn, Path=Tag}" />
  311. </i:EventTrigger>
  312. </i:Interaction.Triggers>
  313. </RadioButton>
  314. <RadioButton
  315. x:Name="TextAlignBtn"
  316. Grid.Column="3"
  317. Width="32"
  318. Height="32"
  319. Margin="8,0"
  320. VerticalContentAlignment="Center"
  321. Background="Transparent"
  322. Foreground="#616469"
  323. GroupName="TextAlign"
  324. Style="{DynamicResource GreyBgRadioBtnStyle}"
  325. Tag="Justify">
  326. <RadioButton.Content>
  327. <Grid Width="32" Height="32">
  328. <Canvas Margin="5,10,0,0">
  329. <Rectangle
  330. Canvas.Top="0.25"
  331. Width="14"
  332. Height="1.5"
  333. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  334. StrokeThickness="1.5" />
  335. <Rectangle
  336. Canvas.Top="8.25"
  337. Width="14"
  338. Height="1.5"
  339. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  340. StrokeThickness="1.5" />
  341. <Rectangle
  342. Canvas.Top="4.25"
  343. Width="14"
  344. Height="1.5"
  345. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  346. StrokeThickness="1.5" />
  347. <Rectangle
  348. Canvas.Top="12.25"
  349. Width="14"
  350. Height="1.5"
  351. Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
  352. StrokeThickness="1.5" />
  353. </Canvas>
  354. </Grid>
  355. </RadioButton.Content>
  356. <i:Interaction.Triggers>
  357. <i:EventTrigger EventName="Checked">
  358. <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignBtn, Path=Tag}" />
  359. </i:EventTrigger>
  360. </i:Interaction.Triggers>
  361. </RadioButton>
  362. </StackPanel>
  363. <cusColor:ColorContent
  364. x:Name="FontColorBox"
  365. Width="56"
  366. HorizontalAlignment="Right"
  367. ShowColorList="Collapsed"
  368. UIColor="{Binding FontVm.CurrentFontColor,Mode=OneWay}"
  369. >
  370. <i:Interaction.Triggers>
  371. <i:EventTrigger EventName="SelectedColorInvoke">
  372. <i:InvokeCommandAction Command="{Binding SelectedColorCommand}" CommandParameter="{Binding ElementName=FontColorBox,Path=SelectedColor}"/>
  373. </i:EventTrigger>
  374. </i:Interaction.Triggers>
  375. </cusColor:ColorContent>
  376. </Grid>
  377. </StackPanel>
  378. </StackPanel>
  379. <Grid Margin="15,18,15,0">
  380. <Grid.RowDefinitions>
  381. <RowDefinition Height="auto"/>
  382. <RowDefinition/>
  383. </Grid.RowDefinitions>
  384. <TextBlock Text="Fill" VerticalAlignment="Center"/>
  385. <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"
  386. InitValue="{Binding BasicVm.FillOpacity,Mode=OneWay}"
  387. Visibility="{Binding BasicVm.IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
  388. >
  389. <i:Interaction.Triggers>
  390. <i:EventTrigger EventName="SelectedValueChanged">
  391. <i:InvokeCommandAction Command="{Binding SelectedOpacityValueCommand}" CommandParameter="{Binding ElementName=layerThick,Path=Value}"/>
  392. </i:EventTrigger>
  393. </i:Interaction.Triggers>
  394. </CompositeControl:SlidContent>
  395. <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor"
  396. UIColor="{Binding BasicVm.CurrentFillColor,Mode=OneWay}">
  397. <i:Interaction.Triggers>
  398. <i:EventTrigger EventName="SelectedColorInvoke">
  399. <i:InvokeCommandAction Command="{Binding SelectedFillColorCommand}" CommandParameter="{Binding ElementName=cusColor,Path=SelectedColor}"/>
  400. </i:EventTrigger>
  401. </i:Interaction.Triggers>
  402. </CompositeControl:ColorContent>
  403. </Grid>
  404. <!--MVP不上-->
  405. <TextBlock x:Name="thicknessText" Visibility="Collapsed" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="14" LineHeight="20" Margin="12,14,0,0" >Thickness</TextBlock>
  406. <Grid Visibility="Collapsed">
  407. <Grid.ColumnDefinitions>
  408. <ColumnDefinition Width="*"></ColumnDefinition>
  409. <ColumnDefinition Width="auto"></ColumnDefinition>
  410. </Grid.ColumnDefinitions>
  411. <Slider Name="ThicknessSlider" VerticalAlignment="Center" Margin="12,0,0,0" Width="148" Minimum="0" Maximum="24" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
  412. Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True" >
  413. <Slider.Resources>
  414. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  415. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  416. </Slider.Resources>
  417. </Slider>
  418. <Border Grid.Column="1" BorderBrush="#E2E3E6" Width="80" Height="32" Margin="0,0,11,0" BorderThickness="0">
  419. <Grid>
  420. <ComboBox Name="ThicknessBox" BorderThickness="1" Padding="10" Background="Transparent" BorderBrush="#FFE2E3E6"
  421. MaxDropDownHeight="200">
  422. <ComboBox.ItemContainerStyle>
  423. <Style TargetType="{x:Type ComboBoxItem}">
  424. <Setter Property="Padding" Value="10 0 0 0"/>
  425. </Style>
  426. </ComboBox.ItemContainerStyle>
  427. <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  428. <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  429. <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  430. <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  431. <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  432. <ComboBoxItem Content="15" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  433. <ComboBoxItem Content="18" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  434. <ComboBoxItem Content="21" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  435. <ComboBoxItem Content="24" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  436. </ComboBox>
  437. <TextBox Name="ThicknessText" Background="White" FontFamily="Segoe UI" FontSize="14" Height="20" Margin="10,0,35,0" IsReadOnly="True"
  438. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" >
  439. </TextBox>
  440. </Grid>
  441. </Border>
  442. </Grid>
  443. <StackPanel Visibility="Collapsed" Orientation="Horizontal" Margin="0,20,0,0">
  444. <RadioButton x:Name="BtnSolid" Tag="Solid" GroupName="LineMode"
  445. Width="105" Height="32" Margin="0,0,10,0" Foreground="#616469"
  446. VerticalContentAlignment="Center" Background="Transparent"
  447. Style="{DynamicResource GreyBgRadioBtnStyle}">
  448. <RadioButton.Content>
  449. <Line X1="10" Y1="5" X2="90" Y2="5" Stroke="Black" StrokeThickness="2" />
  450. </RadioButton.Content>
  451. <i:Interaction.Triggers>
  452. <i:EventTrigger EventName="Checked">
  453. <i:InvokeCommandAction Command="{Binding LineModeCheckedCommand}" CommandParameter="{Binding ElementName=BtnSolid, Path=Tag}" />
  454. </i:EventTrigger>
  455. </i:Interaction.Triggers>
  456. </RadioButton>
  457. <RadioButton x:Name="BtnDashed" Tag="Dashed" GroupName="LineMode"
  458. Width="105" Height="32" Margin="0,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" StrokeDashArray="2"/>
  463. </RadioButton.Content>
  464. <i:Interaction.Triggers>
  465. <i:EventTrigger EventName="Checked">
  466. <i:InvokeCommandAction Command="{Binding LineModeCheckedCommand}" CommandParameter="{Binding ElementName=BtnDashed, Path=Tag}" />
  467. </i:EventTrigger>
  468. </i:Interaction.Triggers>
  469. </RadioButton>
  470. </StackPanel>
  471. </StackPanel>
  472. </Grid>
  473. </UserControl>