CPDFTextStyleUI.xaml 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <UserControl x:Class="Compdfkit_Tools.Edit.CPDFTextStyleUI"
  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:Compdfkit_Tools.Edit"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="800" d:DesignWidth="260">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <ResourceDictionary.MergedDictionaries>
  13. <ResourceDictionary Source="../../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  14. </ResourceDictionary.MergedDictionaries>
  15. <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter" />
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="auto"></RowDefinition>
  21. <RowDefinition Height="*"></RowDefinition>
  22. </Grid.RowDefinitions>
  23. <Border>
  24. <TextBlock VerticalAlignment="Center" Margin="0,10,10,0" FontSize="14" Foreground="#43474D"
  25. Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Font}"></TextBlock>
  26. </Border>
  27. <Grid Grid.Row="1" Margin="0,10,0,0">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="auto"></RowDefinition>
  30. <RowDefinition Height="auto"></RowDefinition>
  31. </Grid.RowDefinitions>
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="auto"></ColumnDefinition>
  34. <ColumnDefinition Width="*"></ColumnDefinition>
  35. </Grid.ColumnDefinitions>
  36. <ComboBox Grid.ColumnSpan="2" Name="FontNameComboBox" Width="228" Height="28" FontSize="14" SelectionChanged="FontNameComboBox_SelectionChanged" BorderThickness="1"
  37. VerticalContentAlignment="Center" Foreground="#43474D" Style="{StaticResource ComboBoxStyle1}" >
  38. </ComboBox>
  39. <ComboBox Name="FontStyleBox" Width="148" Height="28" Grid.Row="1" Margin="0,8,0,0" BorderThickness="1" Foreground="#43474D" FontSize="14"
  40. SelectionChanged="FontStyleBox_SelectionChanged" Style="{StaticResource ComboBoxStyle1}" >
  41. <ComboBoxItem IsSelected="True" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Font_Regular}"/>
  42. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Font_Bold}"/>
  43. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Font_Oblique}"/>
  44. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Font_BoldOblique}"/>
  45. </ComboBox>
  46. <Grid Grid.Row="1" Grid.Column="1" Margin="8,8,0,0">
  47. <ComboBox Name="FontSizeComboBox" Width="72" Height="28" BorderThickness="1" MaxDropDownHeight="200" Foreground="#43474D" FontSize="14"
  48. SelectionChanged="FontSizeComboBox_SelectionChanged" Style="{StaticResource ComboBoxStyle1}" >
  49. <ComboBoxItem>6</ComboBoxItem>
  50. <ComboBoxItem>8</ComboBoxItem>
  51. <ComboBoxItem>9</ComboBoxItem>
  52. <ComboBoxItem>10</ComboBoxItem>
  53. <ComboBoxItem>12</ComboBoxItem>
  54. <ComboBoxItem>14</ComboBoxItem>
  55. <ComboBoxItem>18</ComboBoxItem>
  56. <ComboBoxItem>20</ComboBoxItem>
  57. <ComboBoxItem>22</ComboBoxItem>
  58. <ComboBoxItem>24</ComboBoxItem>
  59. <ComboBoxItem>26</ComboBoxItem>
  60. <ComboBoxItem>28</ComboBoxItem>
  61. <ComboBoxItem>32</ComboBoxItem>
  62. <ComboBoxItem>36</ComboBoxItem>
  63. <ComboBoxItem>48</ComboBoxItem>
  64. <ComboBoxItem>72</ComboBoxItem>
  65. </ComboBox>
  66. <TextBox Name="FontSizeTextBox" IsHitTestVisible="False" Width="72" Height="28" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" BorderThickness="1"
  67. IsReadOnly="True" Padding="0,0,15,0" FontSize="14"></TextBox>
  68. <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
  69. <Path.Data>
  70. M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
  71. </Path.Data>
  72. </Path>
  73. </Grid>
  74. </Grid>
  75. </Grid>
  76. </UserControl>