RadioButtonProperty.xaml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.RadioButtonProperty"
  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. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="40"/>
  23. <RowDefinition Height="*"/>
  24. </Grid.RowDefinitions>
  25. <Border BorderThickness="0" BorderBrush="#1A000000">
  26. <Grid Height="40" Background="White" >
  27. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Radio Button" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  28. </Grid>
  29. </Border>
  30. <TabControl Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
  31. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="General">
  32. <Grid>
  33. <Grid.ColumnDefinitions>
  34. <ColumnDefinition Width="16"/>
  35. <ColumnDefinition Width="*"/>
  36. <ColumnDefinition Width="16"/>
  37. </Grid.ColumnDefinitions>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="auto"/>
  40. <RowDefinition Height="*"/>
  41. </Grid.RowDefinitions>
  42. <Grid Grid.ColumnSpan="3">
  43. <StackPanel x:Name="WarningPanel" Orientation="Horizontal" Background="#1EFF0000" Height="44">
  44. <Path Fill="Black" Margin="8,10,8,0" VerticalAlignment="Top" Data="M1.77832 10.1978H10.2163C11.022 10.1978 11.5269 9.61768 11.5269 8.88721C11.5269 8.66699 11.4731 8.44678 11.355 8.24268L7.12793 0.696289C6.88623 0.26123 6.44043 0.0302734 6 0.0302734C5.5542 0.0302734 5.1084 0.26123 4.8667 0.696289L0.64502 8.24805C0.532227 8.45215 0.467773 8.66699 0.467773 8.88721C0.467773 9.61768 0.972656 10.1978 1.77832 10.1978ZM6 6.60986C5.7207 6.60986 5.57031 6.44873 5.56494 6.16406L5.48975 3.24219C5.48438 2.95752 5.69385 2.75342 5.99463 2.75342C6.29004 2.75342 6.51025 2.96289 6.50488 3.24756L6.42969 6.16406C6.42432 6.4541 6.26855 6.60986 6 6.60986ZM6 8.40918C5.68311 8.40918 5.40381 8.15137 5.40381 7.83447C5.40381 7.51221 5.67773 7.25439 6 7.25439C6.32764 7.25439 6.60156 7.50684 6.60156 7.83447C6.60156 8.15674 6.32227 8.40918 6 8.40918Z"/>
  45. <TextBlock Margin="0,8,8,8" VerticalAlignment="Center" Text="One button in group. At lease two buttons needed." Width="224" TextWrapping="Wrap"/>
  46. </StackPanel>
  47. </Grid>
  48. <StackPanel Grid.Column="1" Grid.Row="1">
  49. <StackPanel >
  50. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Text" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  51. <TextBox x:Name="FieldNameText" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
  52. </StackPanel>
  53. <StackPanel >
  54. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Form Field" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  55. <ComboBox x:Name="FormFieldCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCombox_SelectionChanged">
  56. <ComboBoxItem Content="Visible"/>
  57. <ComboBoxItem Content="Hidden"/>
  58. <ComboBoxItem Content="Visible but doesn't print"/>
  59. <ComboBoxItem Content="Hidden but printable"/>
  60. </ComboBox>
  61. </StackPanel>
  62. </StackPanel>
  63. <StackPanel Grid.Row="1" Grid.ColumnSpan="3" Orientation="Horizontal" Background="#E2E3E6" VerticalAlignment="Bottom">
  64. <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"/>
  65. <TextBlock Margin="0,8,8,8" VerticalAlignment="Center" Text="To create a set of mutually exclusive radio buttons (i.e., where only one can be selected at a time), give the fields the same name but different button choices." Width="224" TextWrapping="Wrap"/>
  66. </StackPanel>
  67. </Grid>
  68. </TabItem>
  69. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Appearance">
  70. <Grid>
  71. <Grid.ColumnDefinitions>
  72. <ColumnDefinition Width="16"/>
  73. <ColumnDefinition Width="*"/>
  74. <ColumnDefinition Width="16"/>
  75. </Grid.ColumnDefinitions>
  76. <StackPanel Grid.Column="1">
  77. <StackPanel>
  78. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Border Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  79. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
  80. </StackPanel>
  81. <StackPanel>
  82. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Background Color" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  83. <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
  84. </StackPanel>
  85. </StackPanel>
  86. </Grid>
  87. </TabItem>
  88. <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Preferences">
  89. <Grid>
  90. <Grid.ColumnDefinitions>
  91. <ColumnDefinition Width="16"/>
  92. <ColumnDefinition Width="*"/>
  93. <ColumnDefinition Width="16"/>
  94. </Grid.ColumnDefinitions>
  95. <StackPanel Grid.Column="1">
  96. <StackPanel >
  97. <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="Button Style" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  98. <ComboBox x:Name="RadioButtonStyleCombox" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="RadioButtonStyleCombox_SelectionChanged">
  99. <ComboBoxItem Content="Check"/>
  100. <ComboBoxItem Content="Circle"/>
  101. <ComboBoxItem Content="Cross"/>
  102. <ComboBoxItem Content="Diamond"/>
  103. <ComboBoxItem Content="Square"/>
  104. <ComboBoxItem Content="Star"/>
  105. </ComboBox>
  106. </StackPanel>
  107. <StackPanel >
  108. <CheckBox x:Name="chkSelected" Content="Selected by default" FontSize="14" VerticalContentAlignment="Center" FontFamily="Segoe UI" FontWeight="Bold" Margin="0 14 0 0" Checked="chkSelected_Checked" Unchecked="chkSelected_Unchecked"/>
  109. </StackPanel>
  110. </StackPanel>
  111. </Grid>
  112. </TabItem>
  113. </TabControl>
  114. </Grid>
  115. </UserControl>