PushButtonProperty.xaml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.PushButtonProperty"
  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. <VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
  19. <VisualBrush.Visual>
  20. <TextBlock Name="hittext" FontStyle="Italic" FontSize="11" Text="https://www.compdf.com"/>
  21. </VisualBrush.Visual>
  22. </VisualBrush>
  23. <Style x:Key="txtboxStyle" TargetType="TextBox">
  24. <Style.Triggers>
  25. <Trigger Property="Text" Value="{x:Null}">
  26. <Setter Property="Background" Value="{StaticResource HintText}"/>
  27. </Trigger>
  28. <Trigger Property="Text" Value="">
  29. <Setter Property="Background" Value="{StaticResource HintText}"/>
  30. </Trigger>
  31. </Style.Triggers>
  32. </Style>
  33. </ResourceDictionary>
  34. </UserControl.Resources>
  35. <Grid>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="40"/>
  38. <RowDefinition Height="*"/>
  39. </Grid.RowDefinitions>
  40. <Border BorderThickness="0" BorderBrush="#1A000000">
  41. <Grid Height="40" Background="White" >
  42. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="PushButton" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  43. </Grid>
  44. </Border>
  45. <TabControl x:Name="TopTabControl" Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
  46. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="General">
  47. <Grid>
  48. <Grid.ColumnDefinitions>
  49. <ColumnDefinition Width="16"/>
  50. <ColumnDefinition Width="*"/>
  51. <ColumnDefinition Width="16"/>
  52. </Grid.ColumnDefinitions>
  53. <StackPanel Grid.Column="1">
  54. <StackPanel>
  55. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  56. <TextBox x:Name="FieldNameText" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
  57. </StackPanel>
  58. <StackPanel >
  59. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Form Field" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  60. <ComboBox x:Name="FormFieldCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCombox_SelectionChanged">
  61. <ComboBoxItem Content="Visible"/>
  62. <ComboBoxItem Content="Hidden"/>
  63. <ComboBoxItem Content="Visible but doesn't print"/>
  64. <ComboBoxItem Content="Hidden but printable"/>
  65. </ComboBox>
  66. </StackPanel>
  67. </StackPanel>
  68. </Grid>
  69. </TabItem>
  70. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Appearance">
  71. <Grid>
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition Width="16"/>
  74. <ColumnDefinition Width="*"/>
  75. <ColumnDefinition Width="16"/>
  76. </Grid.ColumnDefinitions>
  77. <StackPanel Grid.Column="1">
  78. <StackPanel>
  79. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Border Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  80. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
  81. </StackPanel>
  82. <StackPanel>
  83. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Background Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  84. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
  85. </StackPanel>
  86. <StackPanel>
  87. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  88. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="TextColorPickerControl" ColorChanged="TextColorPickerControl_ColorChanged"/>
  89. </StackPanel>
  90. <StackPanel>
  91. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" />
  92. <ComboBox x:Name="FontCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontCombox_SelectionChanged">
  93. <ComboBoxItem Content="Arial"/>
  94. <ComboBoxItem Content="Courier New"/>
  95. <ComboBoxItem Content="Times New Roman"/>
  96. </ComboBox>
  97. <StackPanel Orientation="Horizontal" >
  98. <ComboBox x:Name="FontStyleCombox" Margin="0,8,0,0" Width="148" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontStyleCombox_SelectionChanged">
  99. <ComboBoxItem Content="Regular"/>
  100. <ComboBoxItem Content="Bold"/>
  101. <ComboBoxItem Content="Italic"/>
  102. <ComboBoxItem Content="Bold Italic"/>
  103. </ComboBox>
  104. <ComboBox x:Name="FontSizeCombox" Margin="4,8,0,0" Width="72" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontSizeCombox_SelectionChanged"/>
  105. </StackPanel>
  106. </StackPanel>
  107. </StackPanel>
  108. </Grid>
  109. </TabItem>
  110. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Preferences">
  111. <Grid>
  112. <Grid.ColumnDefinitions>
  113. <ColumnDefinition Width="16"/>
  114. <ColumnDefinition Width="*"/>
  115. <ColumnDefinition Width="16"/>
  116. </Grid.ColumnDefinitions>
  117. <StackPanel Grid.Column="1">
  118. <StackPanel>
  119. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Value Text" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  120. <TextBox x:Name="ItemText" Margin="0,8,0,0" TextChanged="ItemText_TextChanged"/>
  121. </StackPanel>
  122. <StackPanel>
  123. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Effect after selection" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  124. <ComboBox x:Name="TextAlignmentCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="TextAlignmentCombox_SelectionChanged">
  125. <ComboBoxItem Content="None"/>
  126. <ComboBoxItem Content="Go To Pages"/>
  127. <ComboBoxItem Content="Open a Web Link"/>
  128. </ComboBox>
  129. <TextBox x:Name="ActionContentText" Margin="0,4,0,0" Text="123" TextChanged="ActionContentText_TextChanged" Visibility="Collapsed"/>
  130. </StackPanel>
  131. </StackPanel>
  132. </Grid>
  133. </TabItem>
  134. </TabControl>
  135. </Grid>
  136. </UserControl>