<UserControl x:Class="ComPDFKit.Controls.PDFControl.CheckBoxProperty"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:cpdfcommon="clr-namespace:ComPDFKit.Controls.Common"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="300"
             Loaded="UserControl_Loaded"
             Unloaded="UserControl_Unloaded">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../Asset/Styles/TabControlStyle.xaml"></ResourceDictionary>
                <ResourceDictionary Source="../../Asset/Styles/TabItemStyle.xaml"></ResourceDictionary>
                <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
        </ResourceDictionary>
    </UserControl.Resources>
    <ScrollViewer VerticalScrollBarVisibility="Auto">

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border BorderThickness="0" BorderBrush="#1A000000">
                <Grid  Height="40" Background="White" >
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Chb}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
                </Grid>
            </Border>
            <TabControl Grid.Row="1" Style="{DynamicResource TabControlStyle1}" BorderThickness="0">
                <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_General}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="16"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="1">
                            <StackPanel  >
                                <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"/>
                                <TextBox x:Name="FieldNameText" Height="32" Margin="0,8,0,0" TextChanged="FieldNameText_TextChanged"/>
                            </StackPanel>
                            <StackPanel >
                                <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"/>
                                <ComboBox x:Name="FormFieldCmb" Margin="0,8,0,0" Height="32" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="FormFieldCmb_SelectionChanged">
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Visible}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Hidden}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_NoPrint}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Option_Print}"/>
                                </ComboBox>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </TabItem>
                <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Appearance}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="16"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="1">
                            <StackPanel>
                                <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"/>
                                <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BorderColorPickerControl" ColorChanged="BorderColorPickerControl_ColorChanged"/>
                            </StackPanel>
                            <StackPanel>
                                <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"/>
                                <cpdfcommon:ColorPickerControl Margin="0,18,0,0" x:Name="BackgroundColorPickerControl" ColorChanged="BackgroundColorPickerControl_ColorChanged"/>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </TabItem>
                <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Preferences}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="16"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="1">
                            <StackPanel  >
                                <TextBlock Margin="0,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Check_Style}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
                                <ComboBox x:Name="CheckButtonStyleCmb" Height="32" Margin="0,8,0,0" Style="{StaticResource ComboBoxStyle1}" SelectedIndex="0" SelectionChanged="CheckButtonStyleCmb_SelectionChanged">
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Check}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Circle}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Cross}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Diamond}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Square}"/>
                                    <ComboBoxItem Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Star}"/>
                                </ComboBox>
                            </StackPanel>
                            <StackPanel >
                                <CheckBox x:Name="chkSelected" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Style_Default}" FontSize="14" VerticalContentAlignment="Center" FontFamily="Microsoft YaHei" FontWeight="Bold" Margin="0 14 0 0" Checked="chkSelected_Checked"  Unchecked="chkSelected_Unchecked"/>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </TabItem>
            </TabControl>
        </Grid>
    </ScrollViewer>
</UserControl>
