ListBoxProperty.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControl.ListBoxProperty"
  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"
  7. xmlns:cpdfcommon="clr-namespace:ComPDFKit.Controls.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="500" d:DesignWidth="300"
  10. Loaded="UserControl_Loaded"
  11. Unloaded="UserControl_Unloaded"
  12. >
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="../../Asset/Styles/TabControlStyle.xaml"></ResourceDictionary>
  17. <ResourceDictionary Source="../../Asset/Styles/TabItemStyle.xaml"></ResourceDictionary>
  18. <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  19. </ResourceDictionary.MergedDictionaries>
  20. <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
  21. </ResourceDictionary>
  22. </UserControl.Resources>
  23. <Grid>
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="40"/>
  26. <RowDefinition Height="*"/>
  27. </Grid.RowDefinitions>
  28. <Border BorderThickness="0" BorderBrush="#1A000000">
  29. <Grid Height="40" Background="White" >
  30. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_ListBox}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  31. </Grid>
  32. </Border>
  33. <TabControl x:Name="TopTabControl" Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
  34. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_General}">
  35. <Grid>
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition Width="16"/>
  38. <ColumnDefinition Width="*"/>
  39. <ColumnDefinition Width="16"/>
  40. </Grid.ColumnDefinitions>
  41. <StackPanel Grid.Column="1">
  42. <StackPanel >
  43. <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"/>
  44. <TextBox x:Name="FieldNameText" Height="32" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
  45. </StackPanel>
  46. <StackPanel >
  47. <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"/>
  48. <ComboBox x:Name="FormFieldCmb" Height="32" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCmb_SelectionChanged">
  49. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Visible}"/>
  50. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Hidden}"/>
  51. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_NoPrint}"/>
  52. <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Print}"/>
  53. </ComboBox>
  54. </StackPanel>
  55. </StackPanel>
  56. </Grid>
  57. </TabItem>
  58. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Appearance}">
  59. <Grid>
  60. <Grid.ColumnDefinitions>
  61. <ColumnDefinition Width="16"/>
  62. <ColumnDefinition Width="*"/>
  63. <ColumnDefinition Width="16"/>
  64. </Grid.ColumnDefinitions>
  65. <StackPanel Grid.Column="1">
  66. <StackPanel>
  67. <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"/>
  68. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
  69. </StackPanel>
  70. <StackPanel>
  71. <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"/>
  72. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
  73. </StackPanel>
  74. <StackPanel>
  75. <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"/>
  76. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="TextColorPickerControl" ColorChanged="TextColorPickerControl_ColorChanged"/>
  77. </StackPanel>
  78. <StackPanel>
  79. <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" />
  80. <ComboBox x:Name="FontCmb" Height="28" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontCmb_SelectionChanged" PreviewMouseDown="FontCmb_PreviewMouseDown">
  81. </ComboBox>
  82. <StackPanel Orientation="Horizontal" Height="28" Margin="0,8,0,0">
  83. <ComboBox x:Name="FontStyleCmb" Margin="0,0,0,0" Width="148" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontStyleCmb_SelectionChanged" PreviewMouseDown="FontStyleCmb_PreviewMouseDown">
  84. </ComboBox>
  85. <ComboBox x:Name="FontSizeCmb" Margin="4,0,0,0" Width="72" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FontSizeCmb_SelectionChanged"/>
  86. </StackPanel>
  87. </StackPanel>
  88. </StackPanel>
  89. </Grid>
  90. </TabItem>
  91. <TabItem Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Preferences}">
  92. <Grid>
  93. <Grid.ColumnDefinitions>
  94. <ColumnDefinition Width="16"/>
  95. <ColumnDefinition Width="*"/>
  96. <ColumnDefinition Width="16"/>
  97. </Grid.ColumnDefinitions>
  98. <StackPanel Grid.Column="1">
  99. <StackPanel>
  100. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Item}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  101. <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
  102. <TextBox Name="txtItemInput" Width="192" Height="28" VerticalContentAlignment="Center" FontSize="14" HorizontalAlignment="Left" TextChanged="txtItemInput_TextChanged"/>
  103. <Button Name="btnAddItem" Margin="8,0,0,0" Width="20" Height="20" Background="Transparent" IsEnabled="False" BorderThickness="1" HorizontalAlignment="Right" Click="btnAddItem_Click" >
  104. <Path Fill="Black" Data="M0.000488281 5.47803H4.52197V10H5.4834V5.47803H10.0005V4.5166H5.4834V0H4.52197V4.5166H0.000488281V5.47803Z"/>
  105. </Button>
  106. </StackPanel>
  107. </StackPanel>
  108. <StackPanel >
  109. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_ItemList}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
  110. <StackPanel Orientation="Horizontal">
  111. <ListBox x:Name="itemsListBox" Margin="0,0,0,0" SelectionMode="Single" Height="96" HorizontalAlignment="Left" Width="192" SelectionChanged="itemsListBox_SelectionChanged"/>
  112. <StackPanel Height="96" Margin="8,0,0,0">
  113. <Button x:Name="btnDelete" Width="20" Height="20" IsEnabled="False" Background="Transparent" BorderThickness="1" VerticalAlignment="Top" Click="btnDelete_Click">
  114. <Path Fill="Black" Data="M0.000488281 1.61084H10.0005V0.649414H0.000488281V1.61084Z"/>
  115. </Button>
  116. <Button x:Name="btnMoveUp" Width="20" Height="20" Margin="0,18,0,0" IsEnabled="False" Background="Transparent" BorderThickness="1" VerticalAlignment="Center" Click="btnMoveUp_Click">
  117. <Path Fill="Black" Data="M5.47803 11.8477L5.44043 2.15728L9.271 6.12212L9.92627 5.43462L5 0.5L0.0791016 5.43462L0.729004 6.12212L4.56494 2.1519L4.52197 11.8477H5.47803Z"/>
  118. </Button>
  119. <Button x:Name="btnMoveDown" Width="20" Height="20" Margin="0,18,0,0" IsEnabled="False" Background="Transparent" BorderThickness="1" VerticalAlignment="Bottom" Click="btnMoveDown_Click">
  120. <Path Fill="Black" Data="M5.47705 0.152295L5.43945 9.84272L9.27002 5.87788L9.92529 6.56538L4.99902 11.5L0.078125 6.56538L0.728027 5.87788L4.56396 9.8481L4.521 0.152295H5.47705Z"/>
  121. </Button>
  122. </StackPanel>
  123. </StackPanel>
  124. </StackPanel>
  125. </StackPanel>
  126. <StackPanel x:Name="TipPanel" Grid.ColumnSpan="3" Orientation="Horizontal" Background="#E2E3E6" VerticalAlignment="Bottom">
  127. <Path Fill="Black" Margin="8,10,8,0" VerticalAlignment="Top" Data="M6 11.6006C3.0083 11.6006 0.521484 9.11377 0.521484 6.12207C0.521484 3.125 3.00293 0.643555 5.99463 0.643555C8.9917 0.643555 11.4785 3.125 11.4785 6.12207C11.4785 9.11377 8.99707 11.6006 6 11.6006ZM5.94629 4.16162C6.34912 4.16162 6.66602 3.83936 6.66602 3.43115C6.66602 3.02295 6.34912 2.70068 5.94629 2.70068C5.54346 2.70068 5.22119 3.02295 5.22119 3.43115C5.22119 3.83936 5.54346 4.16162 5.94629 4.16162ZM5.02783 9.17822H7.27832C7.50928 9.17822 7.68652 9.01172 7.68652 8.78076C7.68652 8.56592 7.50928 8.38867 7.27832 8.38867H6.59619V5.57959C6.59619 5.27881 6.4458 5.07471 6.16113 5.07471H5.11914C4.89355 5.07471 4.71631 5.25195 4.71631 5.4668C4.71631 5.69775 4.89355 5.86426 5.11914 5.86426H5.70996V8.38867H5.02783C4.79688 8.38867 4.61963 8.56592 4.61963 8.78076C4.61963 9.01172 4.79688 9.17822 5.02783 9.17822Z"/>
  128. <TextBlock Margin="0,8,8,8" VerticalAlignment="Center" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Tip_Default}" Width="224" TextWrapping="Wrap"/>
  129. </StackPanel>
  130. </Grid>
  131. </TabItem>
  132. </TabControl>
  133. </Grid>
  134. </UserControl>