ListBoxFormProperty.xaml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <Window x:Class="ComPDFKitDemo.WidgetForm.ListBoxFormProperty"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:ComPDFKitDemo.WidgetForm" xmlns:ColorPicker="clr-namespace:ColorPickerLib.Controls;assembly=ColorPickerLib"
  7. mc:Ignorable="d"
  8. Height="560" Width="720" WindowStyle="SingleBorderWindow" ResizeMode="NoResize">
  9. <Window.Resources>
  10. <ResourceDictionary Source="/ColorPickerLib;component/Themes/LightBrushs.xaml" />
  11. </Window.Resources>
  12. <Grid>
  13. <Grid.ColumnDefinitions>
  14. <ColumnDefinition Width="auto"></ColumnDefinition>
  15. <ColumnDefinition Width="*"></ColumnDefinition>
  16. </Grid.ColumnDefinitions>
  17. <StackPanel Background="#F3F5FA" Name="FormStack">
  18. <TextBlock FontSize="16" Padding="25,20,25,10" Background="#D1E2F2" MouseLeftButtonDown="NavClick" Tag="Regular"> General</TextBlock>
  19. <TextBlock FontSize="16" Padding="25,10,25,10" MouseLeftButtonDown="NavClick" Tag="Appearance"> Appearance</TextBlock>
  20. <TextBlock FontSize="16" Padding="25,10,25,10" MouseLeftButtonDown="NavClick" Tag="Option" Name="OptinTab"> Options</TextBlock>
  21. </StackPanel>
  22. <Grid Grid.Column="1" Margin="20,10,0,0" >
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="auto"></RowDefinition>
  25. <RowDefinition Height="auto"></RowDefinition>
  26. </Grid.RowDefinitions>
  27. <StackPanel Name="RegularPanel">
  28. <TextBlock FontSize="14">Name:</TextBlock>
  29. <TextBox Name="GroupNameText" Margin="0,10,0,0" Width="250" Height="30" HorizontalAlignment="Left" TextChanged="GroupNameText_TextChanged"></TextBox>
  30. <TextBlock FontSize="14" Margin="0,10,0,0">Common Properties:</TextBlock>
  31. <TextBlock Foreground="Gray" Margin="0,10,0,0">Form Field</TextBlock>
  32. <ComboBox Name="FormFieldBox" Height="25" Width="200" HorizontalAlignment="Left" Margin="0,10,0,0"
  33. VerticalContentAlignment="Center" SelectionChanged="FormFieldBox_SelectionChanged">
  34. <ComboBoxItem Tag="0">Visible</ComboBoxItem>
  35. <ComboBoxItem Tag="1">Hidden</ComboBoxItem>
  36. <ComboBoxItem Tag="2">Visible but doesn't print</ComboBoxItem>
  37. <ComboBoxItem Tag="3">Hidden but printable</ComboBoxItem>
  38. </ComboBox>
  39. <CheckBox Name="ReadOnlyBox" Margin="0,10,0,0" Checked="ReadOnlyBox_Checked" Unchecked="ReadOnlyBox_Checked">Read Only</CheckBox>
  40. </StackPanel>
  41. <Grid Name="AppearancePanel" Visibility="Collapsed">
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="*"></ColumnDefinition>
  44. <ColumnDefinition Width="*"></ColumnDefinition>
  45. </Grid.ColumnDefinitions>
  46. <Grid.RowDefinitions>
  47. <RowDefinition Height="auto"></RowDefinition>
  48. <RowDefinition Height="auto"></RowDefinition>
  49. <RowDefinition Height="auto"></RowDefinition>
  50. <RowDefinition Height="auto"></RowDefinition>
  51. <RowDefinition Height="auto"></RowDefinition>
  52. <RowDefinition Height="auto"></RowDefinition>
  53. <RowDefinition Height="auto"></RowDefinition>
  54. <RowDefinition Height="auto"></RowDefinition>
  55. <RowDefinition Height="auto"></RowDefinition>
  56. <RowDefinition Height="auto"></RowDefinition>
  57. </Grid.RowDefinitions>
  58. <TextBlock Margin="0,0,0,15" FontSize="14">Borders and Colors</TextBlock>
  59. <TextBlock Grid.Row="1" Foreground="Gray">Border Color</TextBlock>
  60. <ColorPicker:ColorPicker Name="BorderColorPicker" Grid.Row="2" Width="200" HorizontalAlignment="Left"
  61. Margin="0,10,0,0" SelectedColorChanged="BorderColorPicker_SelectedColorChanged"></ColorPicker:ColorPicker>
  62. <ComboBox Name="ThicknessText" Grid.Row="2" Grid.Column="1" Height="25" Width="200" HorizontalAlignment="Left"
  63. Margin="0,10,0,0" VerticalContentAlignment="Center" SelectionChanged="ThicknessText_SelectionChanged">
  64. <ComboBoxItem Content="Thin"></ComboBoxItem>
  65. <ComboBoxItem Content="Medium"></ComboBoxItem>
  66. <ComboBoxItem Content="Thick"></ComboBoxItem>
  67. </ComboBox>
  68. <TextBlock Grid.Row="3" Foreground="Gray" Margin="0,10,0,0">Fill Color</TextBlock>
  69. <TextBlock Grid.Row="3" Foreground="Gray" Grid.Column="1" Margin="0,10,0,0">Line Style</TextBlock>
  70. <ColorPicker:ColorPicker Name="FillColorPicker" Grid.Row="4" Width="200" HorizontalAlignment="Left"
  71. Margin="0,10,0,0" SelectedColorChanged="FillColorPicker_SelectedColorChanged"></ColorPicker:ColorPicker>
  72. <ComboBox Name="LineStyleBox" Grid.Row="4" Grid.Column="1" Height="25" Width="200" HorizontalAlignment="Left"
  73. Margin="0,10,0,0" VerticalContentAlignment="Center" SelectionChanged="LineStyleBox_SelectionChanged">
  74. <ComboBoxItem>Solid</ComboBoxItem>
  75. <ComboBoxItem>Dash</ComboBoxItem>
  76. </ComboBox>
  77. <TextBlock Grid.Row="5" Margin="0,10,0,0" FontSize="14">Text</TextBlock>
  78. <TextBlock Grid.Row="6" Foreground="Gray" Margin="0,10,0,0">Font</TextBlock>
  79. <TextBlock Grid.Row="6" Foreground="Gray" Grid.Column="1" Margin="0,10,0,0">Size</TextBlock>
  80. <ComboBox Name="FontFamilyBox" Grid.Row="7" Height="25" Width="200" HorizontalAlignment="Left" Margin="0,10,0,0"
  81. VerticalContentAlignment="Center" SelectionChanged="FontFamilyBox_SelectionChanged">
  82. <ComboBoxItem>Helvetica</ComboBoxItem>
  83. <ComboBoxItem>Courier</ComboBoxItem>
  84. <ComboBoxItem>Times</ComboBoxItem>
  85. </ComboBox>
  86. <TextBox Name="FontSizeBox" Grid.Row="7" Grid.Column="1" Height="25" Width="200" HorizontalAlignment="Left" Margin="0,10,0,0"
  87. VerticalContentAlignment="Center" TextChanged="FontSizeBox_TextChanged"></TextBox>
  88. <TextBlock Grid.Row="8" Foreground="Gray" Margin="0,10,0,0">Style</TextBlock>
  89. <TextBlock Grid.Row="8" Grid.Column="1" Foreground="Gray" Margin="0,10,0,0">Text Color</TextBlock>
  90. <ComboBox Name="FontStyleBox" Grid.Row="9" Height="25" Width="200" HorizontalAlignment="Left" Margin="0,10,0,0"
  91. VerticalContentAlignment="Center" SelectionChanged="FontStyleBox_SelectionChanged">
  92. <ComboBoxItem IsSelected="True">Regular</ComboBoxItem>
  93. <ComboBoxItem>Bold</ComboBoxItem>
  94. <ComboBoxItem>Italic</ComboBoxItem>
  95. <ComboBoxItem>Bold Italic</ComboBoxItem>
  96. </ComboBox>
  97. <ColorPicker:ColorPicker Name="FontColorPicker" Grid.Row="9" Grid.Column="1" Width="200" HorizontalAlignment="Left"
  98. Margin="0,10,0,0" SelectedColorChanged="FontColorPicker_SelectedColorChanged"></ColorPicker:ColorPicker>
  99. </Grid>
  100. <Grid Name="OptionPanel" Visibility="Collapsed">
  101. <StackPanel>
  102. <TextBlock FontSize="14">Item</TextBlock>
  103. <TextBox Name="OptionName" Width="200" HorizontalAlignment="Left" Margin="0,10,0,0" Height="25" TextChanged="OptionName_TextChanged"></TextBox>
  104. <TextBlock FontSize="14" Margin="0,10,0,0">Export Value</TextBlock>
  105. <TextBox Name="OptionValue" Width="200" HorizontalAlignment="Left" Margin="0,10,0,0" Height="25" TextChanged="OptionValue_TextChanged"></TextBox>
  106. <Button Name="AddOptionBtn" Width="60" HorizontalAlignment="Left" Margin="0,10,0,0" Padding="5,2" Click="Button_Click">Add</Button>
  107. <TextBlock FontSize="14" Margin="0,10,0,0">Item List</TextBlock>
  108. <ListBox Name="OptionsListBox" Margin="0,10,0,0" MinHeight="60" Width="200" HorizontalAlignment="Left"
  109. SelectionChanged="OptionsListBox_SelectionChanged"></ListBox>
  110. <Button Name="OptionDelBtn" Width="60" HorizontalAlignment="Left" Margin="0,10,0,0" Padding="5,2" Click="ButtonDel_Click">Del</Button>
  111. </StackPanel>
  112. </Grid>
  113. <CheckBox Grid.Row="1" Name="LockBox" Margin="0,10,0,0" Checked="LockBox_Checked" Unchecked="LockBox_Checked">Locked</CheckBox>
  114. </Grid>
  115. </Grid>
  116. </Window>