TextFieldProperty.xaml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.TextFieldProperty"
  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.PDFControl" xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
  7. mc:Ignorable="d"
  8. Loaded="UserControl_Loaded"
  9. Unloaded="UserControl_Unloaded"
  10. >
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="../../Asset/Styles/TabControlStyle.xaml"></ResourceDictionary>
  15. <ResourceDictionary Source="../../Asset/Styles/TabItemStyle.xaml"></ResourceDictionary>
  16. <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="40"/>
  23. <RowDefinition Height="*"/>
  24. </Grid.RowDefinitions>
  25. <Border BorderThickness="0" BorderBrush="#1A000000">
  26. <Grid Height="40" Background="White" >
  27. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Text Field" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  28. </Grid>
  29. </Border>
  30. <TabControl Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
  31. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="General">
  32. <Grid>
  33. <Grid.ColumnDefinitions>
  34. <ColumnDefinition Width="16"/>
  35. <ColumnDefinition Width="*"/>
  36. <ColumnDefinition Width="16"/>
  37. </Grid.ColumnDefinitions>
  38. <StackPanel Grid.Column="1">
  39. <StackPanel >
  40. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  41. <TextBox x:Name="FieldNameText" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
  42. </StackPanel>
  43. <StackPanel >
  44. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Form Field" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  45. <ComboBox x:Name="FormFieldCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCombox_SelectionChanged">
  46. <ComboBoxItem Content="Visible"/>
  47. <ComboBoxItem Content="Hidden"/>
  48. <ComboBoxItem Content="Visible but doesn't print"/>
  49. <ComboBoxItem Content="Hidden but printable"/>
  50. </ComboBox>
  51. </StackPanel>
  52. </StackPanel>
  53. </Grid>
  54. </TabItem>
  55. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Appearance">
  56. <Grid>
  57. <Grid.ColumnDefinitions>
  58. <ColumnDefinition Width="16"/>
  59. <ColumnDefinition Width="*"/>
  60. <ColumnDefinition Width="16"/>
  61. </Grid.ColumnDefinitions>
  62. <StackPanel Grid.Column="1">
  63. <StackPanel>
  64. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Border Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  65. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
  66. </StackPanel>
  67. <StackPanel>
  68. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Background Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  69. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
  70. </StackPanel>
  71. <StackPanel>
  72. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  73. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="TextColorPickerControl" ColorChanged="TextColorPickerControl_ColorChanged"/>
  74. </StackPanel>
  75. <StackPanel>
  76. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" />
  77. <ComboBox x:Name="FontCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontCombox_SelectionChanged">
  78. <ComboBoxItem Content="Arial"/>
  79. <ComboBoxItem Content="Courier New"/>
  80. <ComboBoxItem Content="Times New Roman"/>
  81. </ComboBox>
  82. <StackPanel Orientation="Horizontal" >
  83. <ComboBox x:Name="FontStyleCombox" Margin="0,8,0,0" Width="148" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontStyleCombox_SelectionChanged">
  84. <ComboBoxItem Content="Regular"/>
  85. <ComboBoxItem Content="Bold"/>
  86. <ComboBoxItem Content="Italic"/>
  87. <ComboBoxItem Content="Bold Italic"/>
  88. </ComboBox>
  89. <ComboBox x:Name="FontSizeCombox" Margin="4,8,0,0" Width="72" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontSizeCombox_SelectionChanged"/>
  90. </StackPanel>
  91. </StackPanel>
  92. </StackPanel>
  93. </Grid>
  94. </TabItem>
  95. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Preferences">
  96. <Grid>
  97. <Grid.ColumnDefinitions>
  98. <ColumnDefinition Width="16"/>
  99. <ColumnDefinition Width="*"/>
  100. <ColumnDefinition Width="16"/>
  101. </Grid.ColumnDefinitions>
  102. <StackPanel Grid.Column="1">
  103. <StackPanel >
  104. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text alignment" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  105. <ComboBox x:Name="TextAlignmentCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="TextAlignmentCombox_SelectionChanged">
  106. <ComboBoxItem Content="Left Alignment"/>
  107. <ComboBoxItem Content="Center"/>
  108. <ComboBoxItem Content="Right Alignment"/>
  109. </ComboBox>
  110. </StackPanel>
  111. <StackPanel >
  112. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Default Value" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  113. <TextBox x:Name="DefaultText" Margin="0,8,0,0" Width="224" Height="112" AcceptsReturn="True" TextWrapping="Wrap" TextChanged="DefaultText_TextChanged"/>
  114. <CheckBox x:Name="chkMutiline" Content="Muti-Line" FontSize="14" VerticalContentAlignment="Center" Margin="0 14 0 0" Checked="chkMutiline_Checked" Unchecked="chkMutiline_Unchecked"/>
  115. </StackPanel>
  116. </StackPanel>
  117. </Grid>
  118. </TabItem>
  119. </TabControl>
  120. </Grid>
  121. </UserControl>