PushButtonProperty.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. d:DesignHeight="500" d:DesignWidth="300"
  9. Loaded="UserControl_Loaded"
  10. Unloaded="UserControl_Unloaded"
  11. >
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <ResourceDictionary.MergedDictionaries>
  15. <ResourceDictionary Source="../../Asset/Styles/TabControlStyle.xaml"></ResourceDictionary>
  16. <ResourceDictionary Source="../../Asset/Styles/TabItemStyle.xaml"></ResourceDictionary>
  17. <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  18. </ResourceDictionary.MergedDictionaries>
  19. <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
  20. <VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
  21. <VisualBrush.Visual>
  22. <TextBlock FontStyle="Italic" FontSize="11" Text="{Binding HintText}"/>
  23. </VisualBrush.Visual>
  24. </VisualBrush>
  25. <Style x:Key="txtboxStyle" TargetType="TextBox">
  26. <Style.Triggers>
  27. <Trigger Property="Text" Value="{x:Null}">
  28. <Setter Property="Background" Value="{StaticResource HintText}"/>
  29. </Trigger>
  30. <Trigger Property="Text" Value="">
  31. <Setter Property="Background" Value="{StaticResource HintText}"/>
  32. </Trigger>
  33. </Style.Triggers>
  34. </Style>
  35. </ResourceDictionary>
  36. </UserControl.Resources>
  37. <Grid>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="40"/>
  40. <RowDefinition Height="*"/>
  41. </Grid.RowDefinitions>
  42. <Border BorderThickness="0" BorderBrush="#1A000000">
  43. <Grid Height="40" Background="White" >
  44. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Btn}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  45. </Grid>
  46. </Border>
  47. <TabControl x:Name="TopTabControl" Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
  48. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_General}">
  49. <Grid>
  50. <Grid.ColumnDefinitions>
  51. <ColumnDefinition Width="16"/>
  52. <ColumnDefinition Width="*"/>
  53. <ColumnDefinition Width="16"/>
  54. </Grid.ColumnDefinitions>
  55. <StackPanel Grid.Column="1">
  56. <StackPanel>
  57. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Name}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  58. <TextBox x:Name="FieldNameText" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
  59. </StackPanel>
  60. <StackPanel >
  61. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Visibility}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  62. <ComboBox x:Name="FormFieldCmb" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCmb_SelectionChanged">
  63. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Visible}"/>
  64. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Hidden}"/>
  65. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_NoPrint}"/>
  66. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Print}"/>
  67. </ComboBox>
  68. </StackPanel>
  69. </StackPanel>
  70. </Grid>
  71. </TabItem>
  72. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Appearance}">
  73. <Grid>
  74. <Grid.ColumnDefinitions>
  75. <ColumnDefinition Width="16"/>
  76. <ColumnDefinition Width="*"/>
  77. <ColumnDefinition Width="16"/>
  78. </Grid.ColumnDefinitions>
  79. <StackPanel Grid.Column="1">
  80. <StackPanel>
  81. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_StrokeColor}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  82. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
  83. </StackPanel>
  84. <StackPanel>
  85. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_BgColor}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  86. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
  87. </StackPanel>
  88. <StackPanel>
  89. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_FontColor}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  90. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="TextColorPickerControl" ColorChanged="TextColorPickerControl_ColorChanged"/>
  91. </StackPanel>
  92. <StackPanel>
  93. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Font}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold" />
  94. <ComboBox x:Name="FontCmb" Height="28" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" PreviewMouseDown="FontCmb_PreviewMouseDown" SelectionChanged="FontCmb_SelectionChanged">
  95. </ComboBox>
  96. <StackPanel Orientation="Horizontal" Height="28" Margin="0,8,0,0">
  97. <ComboBox x:Name="FontStyleCmb" Width="148" Style="{StaticResource ComboBoxStyle1}" PreviewMouseDown="FontStyleCmb_PreviewMouseDown" SelectedIndex="0" SelectionChanged="FontStyleCmb_SelectionChanged">
  98. </ComboBox>
  99. <ComboBox x:Name="FontSizeCmb" Width="72" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontSizeCmb_SelectionChanged" Margin="12,0,0,0"/>
  100. </StackPanel>
  101. </StackPanel>
  102. </StackPanel>
  103. </Grid>
  104. </TabItem>
  105. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Preferences}">
  106. <Grid>
  107. <Grid.ColumnDefinitions>
  108. <ColumnDefinition Width="16"/>
  109. <ColumnDefinition Width="*"/>
  110. <ColumnDefinition Width="16"/>
  111. </Grid.ColumnDefinitions>
  112. <StackPanel Grid.Column="1">
  113. <StackPanel>
  114. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_BtnContent}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  115. <TextBox x:Name="ItemText" Margin="0,8,0,0" TextChanged="ItemText_TextChanged"/>
  116. </StackPanel>
  117. <StackPanel>
  118. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Btn_Action}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  119. <ComboBox x:Name="TextAlignmentCmb" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="TextAlignmentCmb_SelectionChanged">
  120. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Action_None}"/>
  121. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Action_Jump}"/>
  122. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Action_Link}"/>
  123. </ComboBox>
  124. <TextBox x:Name="ActionContentText" Margin="0,4,0,0" Text="123" TextChanged="ActionContentText_TextChanged" Visibility="Collapsed"/>
  125. </StackPanel>
  126. </StackPanel>
  127. </Grid>
  128. </TabItem>
  129. </TabControl>
  130. </Grid>
  131. </UserControl>