PushButtonProperty.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <UserControl x:Class="ComPDFKit.Controls.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.Controls.PDFControl" xmlns:cpdfcommon="clr-namespace:ComPDFKit.Controls.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. <ScrollViewer VerticalScrollBarVisibility="Auto">
  38. <Grid>
  39. <Grid.RowDefinitions>
  40. <RowDefinition Height="40"/>
  41. <RowDefinition Height="*"/>
  42. </Grid.RowDefinitions>
  43. <Border BorderThickness="0" BorderBrush="#1A000000">
  44. <Grid Height="40" Background="White" >
  45. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Btn}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  46. </Grid>
  47. </Border>
  48. <TabControl x:Name="TopTabControl" Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
  49. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_General}">
  50. <Grid>
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition Width="16"/>
  53. <ColumnDefinition Width="*"/>
  54. <ColumnDefinition Width="16"/>
  55. </Grid.ColumnDefinitions>
  56. <StackPanel Grid.Column="1">
  57. <StackPanel>
  58. <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"/>
  59. <TextBox x:Name="FieldNameText" Height="32" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
  60. </StackPanel>
  61. <StackPanel >
  62. <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"/>
  63. <ComboBox x:Name="FormFieldCmb" Height="32" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCmb_SelectionChanged">
  64. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Visible}"/>
  65. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Hidden}"/>
  66. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_NoPrint}"/>
  67. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Print}"/>
  68. </ComboBox>
  69. </StackPanel>
  70. </StackPanel>
  71. </Grid>
  72. </TabItem>
  73. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Appearance}">
  74. <Grid>
  75. <Grid.ColumnDefinitions>
  76. <ColumnDefinition Width="16"/>
  77. <ColumnDefinition Width="*"/>
  78. <ColumnDefinition Width="16"/>
  79. </Grid.ColumnDefinitions>
  80. <StackPanel Grid.Column="1">
  81. <StackPanel>
  82. <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"/>
  83. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
  84. </StackPanel>
  85. <StackPanel>
  86. <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"/>
  87. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
  88. </StackPanel>
  89. <StackPanel>
  90. <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"/>
  91. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="TextColorPickerControl" ColorChanged="TextColorPickerControl_ColorChanged"/>
  92. </StackPanel>
  93. <StackPanel>
  94. <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" />
  95. <ComboBox x:Name="FontCmb" Height="28" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" PreviewMouseDown="FontCmb_PreviewMouseDown" SelectionChanged="FontCmb_SelectionChanged">
  96. </ComboBox>
  97. <StackPanel Orientation="Horizontal" Height="28" Margin="0,8,0,0">
  98. <ComboBox x:Name="FontStyleCmb" Width="148" Style="{StaticResource ComboBoxStyle1}" PreviewMouseDown="FontStyleCmb_PreviewMouseDown" SelectedIndex="0" SelectionChanged="FontStyleCmb_SelectionChanged">
  99. </ComboBox>
  100. <ComboBox x:Name="FontSizeCmb" Width="72" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontSizeCmb_SelectionChanged" Margin="12,0,0,0"/>
  101. </StackPanel>
  102. </StackPanel>
  103. </StackPanel>
  104. </Grid>
  105. </TabItem>
  106. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Preferences}">
  107. <Grid>
  108. <Grid.ColumnDefinitions>
  109. <ColumnDefinition Width="16"/>
  110. <ColumnDefinition Width="*"/>
  111. <ColumnDefinition Width="16"/>
  112. </Grid.ColumnDefinitions>
  113. <StackPanel Grid.Column="1">
  114. <StackPanel>
  115. <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"/>
  116. <TextBox x:Name="ItemText" Height="32" Margin="0,8,0,0" TextChanged="ItemText_TextChanged"/>
  117. </StackPanel>
  118. <StackPanel>
  119. <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"/>
  120. <ComboBox x:Name="TextAlignmentCmb" Height="32" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="TextAlignmentCmb_SelectionChanged">
  121. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Action_None}"/>
  122. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Action_Jump}"/>
  123. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Action_Link}"/>
  124. </ComboBox>
  125. <TextBox x:Name="ActionContentText" Height="32" Margin="0,4,0,0" Text="123" TextChanged="ActionContentText_TextChanged" Visibility="Collapsed"/>
  126. </StackPanel>
  127. </StackPanel>
  128. </Grid>
  129. </TabItem>
  130. </TabControl>
  131. </Grid>
  132. </ScrollViewer>
  133. </UserControl>