<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
    xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
    xmlns:hc="https://handyorg.github.io/handycontrol"
    xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls">
    <!--<ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
    </ResourceDictionary.MergedDictionaries>-->
    <!--#region Color-->
    <SolidColorBrush x:Key="foreground" Color="#FFA2C2E8" />
    <!--#endregion-->

    <!--#region ScrollBar-->
    <LinearGradientBrush x:Key="VerticalScrollBarBackground" StartPoint="0,0" EndPoint="1,0">
        <GradientStop Offset="0" Color="#E1E1E1" />
        <GradientStop Offset="0.20" Color="#EDEDED" />
        <GradientStop Offset="0.80" Color="#EDEDED" />
        <GradientStop Offset="1" Color="#E3E3E3" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="Menu.Static.Background" Color="#FFF0F0F0" />
    <SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" />
    <SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" />
    <SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" />
    <SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" />
    <SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#FF000000" />
    <SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" />
    <SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" />
    <SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#FF000000" />
    <SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" />
    <SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" />
    <SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" />
    <Style x:Key="ExpanderHeaderFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle
                            Margin="0"
                            SnapsToDevicePixels="true"
                            Stroke="Black"
                            StrokeDashArray="1 2"
                            StrokeThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}" Cursor="Hand">
                        <Grid
                            Height="35"
                            Margin="5"
                            SnapsToDevicePixels="False">
                            <Grid.Background>
                                <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/Exp.png" />
                            </Grid.Background>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="35" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Image
                                Width="15"
                                Margin="10,0,0,0"
                                Source="/BPASmartClient.CustomResource;component/Image/上箭头.png" />
                            <Ellipse
                                x:Name="circle"
                                Width="19"
                                Height="19"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Fill="{StaticResource Expander.Static.Circle.Fill}"
                                Stroke="{StaticResource Expander.Static.Circle.Stroke}"
                                Visibility="Collapsed" />
                            <Path
                                x:Name="arrow"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                SnapsToDevicePixels="false"
                                Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
                                StrokeThickness="2"
                                Visibility="Collapsed" />
                            <ContentPresenter
                                Grid.Column="1"
                                Margin="4,0,0,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="arrow" Property="Data" Value="M 1,4.5  L 4.5,1  L 8,4.5" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
    <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
    <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />
    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="PasswordChar" Value="●" />
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}" />
        <Setter Property="Foreground" Value="#FF02C9FD" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="CaretBrush" Value="White" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border
                        x:Name="border"
                        BorderBrush="#FF08335F"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="True">
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="border" Property="Opacity" Value="0.56" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.MouseOver.Border}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.Focus.Border}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
                    <Condition Property="IsSelectionActive" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent" SnapsToDevicePixels="False">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="180" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Ellipse
                                    x:Name="circle"
                                    Width="19"
                                    Height="19"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Fill="{StaticResource Expander.Static.Circle.Fill}"
                                    Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
                                <Path
                                    x:Name="arrow"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                    SnapsToDevicePixels="false"
                                    Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
                                    StrokeThickness="2" />
                            </Grid>
                            <ContentPresenter
                                Grid.Column="1"
                                Margin="4,0,0,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="arrow" Property="Data" Value="M 1,4.5  L 4.5,1  L 8,4.5" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent" SnapsToDevicePixels="False">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Ellipse
                                    x:Name="circle"
                                    Width="19"
                                    Height="19"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Fill="{StaticResource Expander.Static.Circle.Fill}"
                                    Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
                                <Path
                                    x:Name="arrow"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                    SnapsToDevicePixels="false"
                                    Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
                                    StrokeThickness="2" />
                            </Grid>
                            <ContentPresenter
                                Grid.Row="1"
                                Margin="0,4,0,0"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Top"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="arrow" Property="Data" Value="M 1,4.5  L 4.5,1  L 8,4.5" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent" SnapsToDevicePixels="False">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="-90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Ellipse
                                    x:Name="circle"
                                    Width="19"
                                    Height="19"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Fill="{StaticResource Expander.Static.Circle.Fill}"
                                    Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
                                <Path
                                    x:Name="arrow"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                    SnapsToDevicePixels="false"
                                    Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
                                    StrokeThickness="2" />
                            </Grid>
                            <ContentPresenter
                                Grid.Row="1"
                                Margin="0,4,0,0"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Top"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="arrow" Property="Data" Value="M 1,4.5  L 4.5,1  L 8,4.5" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
                            <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
                            <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Expander}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="3"
                        SnapsToDevicePixels="true">
                        <DockPanel>
                            <ToggleButton
                                x:Name="HeaderSite"
                                MinWidth="0"
                                MinHeight="0"
                                Margin="1"
                                Padding="{TemplateBinding Padding}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Header}"
                                ContentTemplate="{TemplateBinding HeaderTemplate}"
                                ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                DockPanel.Dock="Top"
                                FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                FontStyle="{TemplateBinding FontStyle}"
                                FontWeight="{TemplateBinding FontWeight}"
                                Foreground="{TemplateBinding Foreground}"
                                IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ExpanderDownHeaderStyle}" />
                            <ContentPresenter
                                x:Name="ExpandSite"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                DockPanel.Dock="Bottom"
                                Focusable="false"
                                Visibility="Collapsed" />
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="true">
                            <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Right">
                            <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
                            <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
                            <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderRightHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Up">
                            <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
                            <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
                            <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderUpHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Left">
                            <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
                            <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
                            <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderLeftHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Menu}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}" />
        <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Margin" Value="10,10,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DatePickerTextBox}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DatePickerTextBox}">
                    <Grid>
                        <Grid.Resources>
                            <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA" />
                        </Grid.Resources>
                        <Border
                            x:Name="Border"
                            Padding="{TemplateBinding Padding}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="1"
                            Opacity="1">
                            <Grid
                                x:Name="WatermarkContent"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <Border x:Name="ContentElement" BorderThickness="1" />
                                <Border x:Name="watermark_decorator" BorderThickness="1">
                                    <ContentControl
                                        x:Name="PART_Watermark"
                                        Padding="2"
                                        Focusable="False"
                                        IsHitTestVisible="False"
                                        Opacity="0" />
                                </Border>
                                <ScrollViewer
                                    x:Name="PART_ContentHost"
                                    Margin="0"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                                <Border
                                    x:Name="FocusVisual"
                                    BorderBrush="#FF45D6FA"
                                    CornerRadius="1"
                                    IsHitTestVisible="False"
                                    Opacity="0" />
                            </Grid>
                        </Border>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="WatermarkStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unwatermarked" />
                                <VisualState x:Name="Watermarked">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="ContentElement"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0" />
                                        <DoubleAnimation
                                            Storyboard.TargetName="PART_Watermark"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="FocusVisual"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DatePicker}">
        <Setter Property="Foreground" Value="#a2c2e8 " />
        <Setter Property="IsTodayHighlighted" Value="True" />
        <Setter Property="SelectedDateFormat" Value="Short" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="Height" Value="24" />
        <Setter Property="BorderBrush" Value="#08335f" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DatePicker}">
                    <Border
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid
                            x:Name="PART_Root"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <Grid.Resources>
                                <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
                                <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
                                    <Grid>
                                        <Grid
                                            Width="15"
                                            Height="15"
                                            Margin="0,2,0,0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Top"
                                            Background="#11FFFFFF"
                                            FlowDirection="LeftToRight">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="20*" />
                                                <ColumnDefinition Width="20*" />
                                                <ColumnDefinition Width="20*" />
                                                <ColumnDefinition Width="20*" />
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="23*" />
                                                <RowDefinition Height="19*" />
                                                <RowDefinition Height="19*" />
                                                <RowDefinition Height="19*" />
                                            </Grid.RowDefinitions>
                                            <Border
                                                x:Name="Highlight"
                                                Grid.Row="0"
                                                Grid.RowSpan="4"
                                                Grid.ColumnSpan="4"
                                                Margin="-1"
                                                BorderBrush="#FF45D6FA"
                                                BorderThickness="1"
                                                CornerRadius="0,0,1,1"
                                                Opacity="0"
                                                Visibility="Hidden" />
                                            <Border
                                                x:Name="Background"
                                                Grid.Row="1"
                                                Grid.RowSpan="3"
                                                Grid.ColumnSpan="4"
                                                Margin="0,-1,0,0"
                                                Background="#FF1F3B53"
                                                BorderBrush="#FFFFFFFF"
                                                BorderThickness="1"
                                                CornerRadius=".5"
                                                Opacity="1"
                                                Visibility="Hidden" />
                                            <Border
                                                x:Name="BackgroundGradient"
                                                Grid.Row="1"
                                                Grid.RowSpan="3"
                                                Grid.ColumnSpan="4"
                                                Margin="0,-1,0,0"
                                                BorderBrush="#BF000000"
                                                BorderThickness="1"
                                                CornerRadius=".5"
                                                Opacity="1"
                                                Visibility="Hidden">
                                                <Border.Background>
                                                    <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                        <GradientStop Offset="0" Color="#FFFFFFFF" />
                                                        <GradientStop Offset="0.375" Color="#F9FFFFFF" />
                                                        <GradientStop Offset="0.625" Color="#E5FFFFFF" />
                                                        <GradientStop Offset="1" Color="#C6FFFFFF" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Rectangle
                                                Grid.RowSpan="1"
                                                Grid.ColumnSpan="4"
                                                StrokeThickness="1"
                                                Visibility="Hidden">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush StartPoint="0.46,1.6" EndPoint="0.3,-1.1">
                                                        <GradientStop Color="#FF4084BD" />
                                                        <GradientStop Offset="1" Color="#FFAFCFEA" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                                <Rectangle.Stroke>
                                                    <LinearGradientBrush StartPoint="0.48,1.25" EndPoint="0.48,-1">
                                                        <GradientStop Color="#FF494949" />
                                                        <GradientStop Offset="1" Color="#FF9F9F9F" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Stroke>
                                            </Rectangle>
                                            <Path
                                                Grid.Row="1"
                                                Grid.RowSpan="3"
                                                Grid.Column="0"
                                                Grid.ColumnSpan="4"
                                                Margin="4,3,4,3"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z"
                                                Fill="#FF2F2F2F"
                                                RenderTransformOrigin="0.5,0.5"
                                                Stretch="Fill"
                                                Visibility="Hidden" />
                                            <Ellipse
                                                Grid.ColumnSpan="4"
                                                Width="3"
                                                Height="3"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Fill="#FFFFFFFF"
                                                StrokeThickness="0"
                                                Visibility="Hidden" />
                                            <Border
                                                x:Name="DisabledVisual"
                                                Grid.Row="0"
                                                Grid.RowSpan="4"
                                                Grid.ColumnSpan="4"
                                                BorderBrush="#B2FFFFFF"
                                                BorderThickness="1"
                                                CornerRadius="0,0,.5,.5"
                                                Opacity="0"
                                                Visibility="Hidden" />
                                            <Image
                                                Grid.RowSpan="10"
                                                Grid.Column="0"
                                                Grid.ColumnSpan="10"
                                                Source="/BPASmartClient.CustomResource;component/Image/日历.png" />

                                        </Grid>
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualStateGroup.Transitions>
                                                    <VisualTransition GeneratedDuration="0" />
                                                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                    <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                </VisualStateGroup.Transitions>
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimation
                                                            Storyboard.TargetName="Background"
                                                            Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
                                                            To="#FF448DCA"
                                                            Duration="0" />
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="Background"
                                                            Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="Highlight"
                                                            Storyboard.TargetProperty="(UIElement.Opacity)"
                                                            Duration="00:00:00.001">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames
                                                            BeginTime="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                                            Duration="00:00:00.001">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled" />
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                    </Grid>
                                </ControlTemplate>
                            </Grid.Resources>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Button
                                x:Name="PART_Button"
                                Grid.Row="0"
                                Grid.Column="1"
                                Width="20"
                                Margin="3,0,3,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Focusable="False"
                                Foreground="{TemplateBinding Foreground}"
                                Template="{StaticResource DropDownButtonTemplate}" />
                            <DatePickerTextBox
                                x:Name="PART_TextBox"
                                Grid.Row="0"
                                Grid.Column="0"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                Focusable="{TemplateBinding Focusable}" />
                            <Grid
                                x:Name="PART_DisabledVisual"
                                Grid.Row="0"
                                Grid.Column="0"
                                Grid.ColumnSpan="2"
                                IsHitTestVisible="False"
                                Opacity="0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Rectangle
                                    Grid.Row="0"
                                    Grid.Column="0"
                                    RadiusX="1"
                                    RadiusY="1" />
                                <Rectangle
                                    Grid.Row="0"
                                    Grid.Column="1"
                                    Width="19"
                                    Height="18"
                                    Margin="3,0,3,0"
                                    Fill="#A5FFFFFF"
                                    RadiusX="1"
                                    RadiusY="1" />

                                <Popup
                                    x:Name="PART_Popup"
                                    AllowsTransparency="True"
                                    Placement="Bottom"
                                    PlacementTarget="{Binding ElementName=PART_TextBox}"
                                    StaysOpen="False" />
                            </Grid>
                        </Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="PART_DisabledVisual"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Border>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
                            <Setter TargetName="PART_TextBox" Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="arrowPath" TargetType="Path">
        <Setter Property="Data" Value="M5.5555,8.4319998 L0.5,0.5 L10.611,0.5 z" />
        <Setter Property="Fill" Value="Gray" />
        <Setter Property="Stretch" Value="Fill" />
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Stroke" Value="Black" />
        <Setter Property="Width" Value="8" />
        <Setter Property="Height" Value="5" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Cursor" Value="Hand" />
    </Style>

    <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Image
                        Width="8"
                        Height="5"
                        Source="Image/Scroll_↑.png" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Image
                        Width="8"
                        Height="5"
                        Source="Image/Scroll_↓.png" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Image
                        Width="5"
                        Height="8"
                        Source="Image/Scroll_←.png" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Image
                        Width="5"
                        Height="8"
                        Source="Image/Scroll_→.png" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Fill="{TemplateBinding Background}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border
                        x:Name="bd1"
                        Margin="2,2,2,2"
                        Background="#00c2f4"
                        CornerRadius="3"
                        Cursor="Hand"
                        Opacity="1"
                        SnapsToDevicePixels="true" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush x:Key="HorizontalScrollBarBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#E1E1E1" />
        <GradientStop Offset="0.20" Color="#EDEDED" />
        <GradientStop Offset="0.80" Color="#EDEDED" />
        <GradientStop Offset="1" Color="#E3E3E3" />
    </LinearGradientBrush>

    <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Fill="{TemplateBinding Background}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
            </Setter.Value>
        </Setter>
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Opacity" Value="1" />
        <Setter Property="MinWidth" Value="3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Border
                        Width="10"
                        Margin="0,0,0,0"
                        Background="{TemplateBinding Background}"
                        CornerRadius="2"
                        Opacity="{TemplateBinding Opacity}">
                        <Grid x:Name="Bg" SnapsToDevicePixels="true">
                            <Grid.RowDefinitions>
                                <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
                                <RowDefinition Height="*" />
                                <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
                            </Grid.RowDefinitions>
                            <RepeatButton
                                Themes:ScrollChrome.ScrollGlyph="UpArrow"
                                Command="{x:Static ScrollBar.LineUpCommand}"
                                IsEnabled="{TemplateBinding IsMouseOver}"
                                Style="{StaticResource UpScrollBarButton}" />
                            <Track
                                x:Name="PART_Track"
                                Grid.Row="1"
                                IsDirectionReversed="true"
                                IsEnabled="{TemplateBinding IsMouseOver}">
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
                                </Track.DecreaseRepeatButton>

                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
                                </Track.IncreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Style="{StaticResource ScrollBarThumb}" />
                                </Track.Thumb>
                            </Track>
                            <RepeatButton
                                Grid.Row="2"
                                Themes:ScrollChrome.ScrollGlyph="DownArrow"
                                Command="{x:Static ScrollBar.LineDownCommand}"
                                IsEnabled="{TemplateBinding IsMouseOver}"
                                Style="{StaticResource DownScrollBarButton}" />
                        </Grid>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">

                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <Border
                                Height="10"
                                Margin="0,0,0,0"
                                Background="{TemplateBinding Background}"
                                CornerRadius="2"
                                Opacity="{TemplateBinding Opacity}">
                                <Grid
                                    x:Name="Bg"
                                    Background="{TemplateBinding Background}"
                                    SnapsToDevicePixels="true">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
                                    </Grid.ColumnDefinitions>
                                    <RepeatButton
                                        Themes:ScrollChrome.ScrollGlyph="LeftArrow"
                                        Command="{x:Static ScrollBar.LineLeftCommand}"
                                        IsEnabled="{TemplateBinding IsMouseOver}"
                                        Style="{StaticResource LeftScrollBarButton}" />
                                    <Track
                                        x:Name="PART_Track"
                                        Grid.Column="1"
                                        IsEnabled="{TemplateBinding IsMouseOver}">
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb Themes:ScrollChrome.ScrollGlyph="HorizontalGripper" Style="{StaticResource ScrollBarThumb}" />
                                        </Track.Thumb>
                                    </Track>
                                    <RepeatButton
                                        Grid.Column="2"
                                        Themes:ScrollChrome.ScrollGlyph="RightArrow"
                                        Command="{x:Static ScrollBar.LineRightCommand}"
                                        IsEnabled="{TemplateBinding IsMouseOver}"
                                        Style="{StaticResource RightScrollBarButton}" />
                                </Grid>
                            </Border>

                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--#endregion-->

    <!--#region DataGrid-->

    <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Width" Value="1" />
        <Setter Property="Background" Value="#175c86" />
        <Setter Property="Cursor" Value="SizeWE" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border
                        Width="{TemplateBinding Width}"
                        Margin="{TemplateBinding Margin}"
                        Background="{TemplateBinding Background}"
                        Opacity="0.4" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DataGridColumnHeader}">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="30" />
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
                <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" Opacity="0.3"/>-->

            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="#00c2f4" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                    <Grid>
                        <Border
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                        <GridSplitter
                            HorizontalAlignment="Right"
                            Background="#FF0BAE3F"
                            BorderBrush="#FFBD2A2A" />
                        <Thumb
                            x:Name="PART_RightHeaderGripper"
                            Width="2"
                            HorizontalAlignment="Right"
                            Background="#FF1D9B9E"
                            Style="{StaticResource ColumnHeaderGripperStyle}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="30" />
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" />
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                    <Grid>
                        <Border
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>

                        <Thumb
                            x:Name="PART_RightHeaderGripper"
                            HorizontalAlignment="Right"
                            Style="{StaticResource ColumnHeaderGripperStyle}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DataGridRow}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Foreground" Value="#abf4ff" />
        <Setter Property="BorderBrush" Value="#abf4ff" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridRow}">
                    <Border
                        x:Name="DGR_Border"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="True">
                        <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
                            <SelectiveScrollingGrid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </SelectiveScrollingGrid.ColumnDefinitions>
                            <SelectiveScrollingGrid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </SelectiveScrollingGrid.RowDefinitions>
                            <DataGridCellsPresenter
                                Grid.Column="1"
                                ItemsPanel="{TemplateBinding ItemsPanel}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <DataGridDetailsPresenter
                                Grid.Row="1"
                                Grid.Column="1"
                                SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
                                Visibility="{TemplateBinding DetailsVisibility}" />
                            <DataGridRowHeader
                                Grid.RowSpan="2"
                                SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                                Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
                        </SelectiveScrollingGrid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="#230077BC" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal_Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="#3D0077BC" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidFocused" />
                                <VisualState x:Name="InvalidUnfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DataGridCell}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="#FF31879E" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridCell}">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="True">
                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <!--<Setter Property="Background" Value="#FF2281EC"/>-->
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
                <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
            </Trigger>
            <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
            </Trigger>-->
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type DataGrid}">
        <Setter Property="AutoGenerateColumns" Value="False" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="CanUserAddRows" Value="False" />
        <Setter Property="CanUserDeleteRows" Value="False" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="HeadersVisibility" Value="Column" />
        <Setter Property="GridLinesVisibility" Value="None" />
        <Setter Property="SelectionMode" Value="Single" />
        <!--<Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DataGrid">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
                        <ScrollViewer x:Name="DG_ScrollViewer" Focusable="False">
                            <ScrollViewer.Template>
                                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Button Command="ApplicationCommands.SelectAll" Focusable="False" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}">
                                            <Button.Visibility>
                                                <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
                                                    <Binding.ConverterParameter>
                                                        <DataGridHeadersVisibility>All</DataGridHeadersVisibility>
                                                    </Binding.ConverterParameter>
                                                </Binding>
                                            </Button.Visibility>
                                        </Button>
                                        <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1">
                                            <DataGridColumnHeadersPresenter.Visibility>
                                                <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
                                                    <Binding.ConverterParameter>
                                                        <DataGridHeadersVisibility>Column</DataGridHeadersVisibility>
                                                    </Binding.ConverterParameter>
                                                </Binding>
                                            </DataGridColumnHeadersPresenter.Visibility>
                                        </DataGridColumnHeadersPresenter>
                                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" Grid.ColumnSpan="2" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Grid.Row="1"/>
                                        <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
                                        <Grid Grid.Column="1" Grid.Row="2" >
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
                                        </Grid>

                                    </Grid>
                                </ControlTemplate>
                            </ScrollViewer.Template>
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>-->
        <!--<Style.Triggers>
            <DataTrigger Binding="{Binding PZItems.Count}" Value="0">
                <Setter Property="Visibility" Value="Collapsed"></Setter>
            </DataTrigger>

        </Style.Triggers>-->

    </Style>

    <!--#endregion-->

    <!--#region ListBox-->
    <SolidColorBrush x:Key="ListBorder" Color="#828790" />

    <Style TargetType="{x:Type ListBox}">
        <!--<Setter Property="Background"  >
            <Setter.Value>
                <ImageBrush ImageSource="Images/Pop_bg.png" Stretch="Fill" />
            </Setter.Value>
        </Setter>-->
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center" />

    </Style>
    <!--#endregion-->

    <!--#region ListBoxItem-->
    <Style x:Key="baseListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Padding" Value="2,0,0,0" />
        <Setter Property="Foreground" Value="#FF90C390" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border
                        x:Name="Bd"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="Bd" Property="Background" Value="#230077BC" />
                            <Setter TargetName="Bd" Property="Opacity" Value="0.8" />
                            <Setter Property="Foreground" Value="Snow" />
                        </Trigger>
                        <!--<MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True"/>
                                <Condition Property="Selector.IsSelectionActive" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" TargetName="Bd" Value="#FFA7BB24"/>
                            <Setter Property="Foreground" Value="Snow"/>
                        </MultiTrigger>-->
                        <!--<MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Binding="{Binding }" Value="true"/>
                                <Condition Property="Selector.IsSelectionActive" Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionTextColor}}"/>
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="true">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>-->
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="baseListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Padding" Value="2,0,0,0" />
        <Setter Property="Foreground" Value="#FF90C390" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border
                        x:Name="Bd"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="Selector.IsSelectionActive" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Opacity" Value="0.6" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource baseListBoxItemStyle}" TargetType="{x:Type ListBoxItem}" />

    <Style
        x:Key="ListBoxItemStyle1"
        BasedOn="{StaticResource baseListBoxItemStyle}"
        TargetType="{x:Type ListBoxItem}">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding DataContext.IsNotDeal, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
                    <Condition Binding="{Binding IsDeal}" Value="0" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Collapsed" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding DataContext.IsRecive, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
                    <Condition Binding="{Binding IsDeal}" Value="1" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Collapsed" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding DataContext.IsRefuse, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
                    <Condition Binding="{Binding IsDeal}" Value="2" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Collapsed" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
    <!--#endregion-->

    <!--#region TabControl-->
    <Style x:Key="borderTab4_No" TargetType="Border">
        <Style.Setters>
            <Setter Property="Background">
                <Setter.Value>
                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>

    <Style x:Key="borderTab4_Select" TargetType="Border">
        <Style.Setters>
            <Setter Property="Background">
                <Setter.Value>
                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>

    <Style x:Key="TabItemFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        Margin="4,4,4,2"
                        SnapsToDevicePixels="true"
                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                        StrokeDashArray="1 2"
                        StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid
                        ClipToBounds="true"
                        KeyboardNavigation.TabNavigation="Local"
                        SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto" />
                            <RowDefinition x:Name="RowDefinition1" Height="*" />
                        </Grid.RowDefinitions>
                        <TabPanel
                            x:Name="HeaderPanel"
                            Grid.Row="0"
                            Grid.Column="0"
                            Margin="2,2,2,0"
                            Panel.ZIndex="1"
                            IsItemsHost="true"
                            KeyboardNavigation.TabIndex="1" />
                        <Border
                            x:Name="ContentPanel"
                            Grid.Row="1"
                            Grid.Column="0"
                            BorderBrush="{x:Null}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            KeyboardNavigation.DirectionalNavigation="Contained"
                            KeyboardNavigation.TabIndex="2"
                            KeyboardNavigation.TabNavigation="Local">
                            <ContentPresenter
                                x:Name="PART_SelectedContentHost"
                                Margin="{TemplateBinding Padding}"
                                ContentSource="SelectedContent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
                            <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
                            <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TabItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
        <Setter Property="Foreground">
            <Setter.Value>
                #A5FFFFFF
            </Setter.Value>
        </Setter>
        <Setter Property="Padding" Value="6,1,6,1" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Border
                        x:Name="Bd"
                        Height="35"
                        Margin="5"
                        Padding="{TemplateBinding Padding}"
                        BorderThickness="1"
                        CornerRadius="2">
                        <ContentPresenter
                            x:Name="Content"
                            HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                            VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                            ContentSource="Header"
                            Cursor="Hand"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Foreground" Value="#8f723c" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="False">
                            <Setter Property="Foreground" Value="White" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="#8f723c" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TabItem样式1" TargetType="{x:Type TabItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
        <Setter Property="Foreground" Value="#A5FFFFFF" />
        <Setter Property="Padding" Value="6,1,6,1" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Border
                        x:Name="Bd"
                        Height="60"
                        Margin="2"
                        Padding="{TemplateBinding Padding}"
                        BorderThickness="1"
                        CornerRadius="2">
                        <ContentPresenter
                            x:Name="Content"
                            HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                            VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                            ContentSource="Header"
                            Cursor="Hand"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Foreground" Value="#8f723c" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_Select.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="False">
                            <Setter Property="Foreground" Value="#134278" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_No.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TabItem样式2" TargetType="{x:Type TabItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
        <Setter Property="Foreground">
            <Setter.Value>
                #A5FFFFFF
            </Setter.Value>
        </Setter>
        <Setter Property="Padding" Value="6,1,6,1" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Border
                        x:Name="Bd"
                        Height="60"
                        Margin="2"
                        Padding="{TemplateBinding Padding}"
                        BorderThickness="1"
                        CornerRadius="2">
                        <ContentPresenter
                            x:Name="Content"
                            HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                            VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                            ContentSource="Header"
                            Cursor="Hand"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Foreground" Value="#8f723c" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_SelectBJ.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="False">
                            <Setter Property="Foreground" Value="#134278" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_NoBJ.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region ProgressBar圆形统计图-->
    <local:Style3DashConverter x:Key="Style3Dash" />
    <local:Style3ArcConverter x:Key="Style3Arc" />
    <Style x:Key="CircleProgressBar3" TargetType="{x:Type ProgressBar}">
        <Setter Property="Width" Value="100" />
        <Setter Property="Height" Value="100" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <Grid>
                        <Rectangle
                            Fill="#ef426f"
                            RadiusX="5"
                            RadiusY="5"
                            Visibility="Collapsed" />
                        <Ellipse
                            Width="80"
                            Height="80"
                            Stroke="#FF2470FF"
                            StrokeThickness="10" />
                        <Ellipse
                            Width="80"
                            Height="80"
                            RenderTransformOrigin="0.5,0.5"
                            Stroke="#FF0198FF"
                            StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}"
                            StrokeThickness="10">
                            <Ellipse.RenderTransform>
                                <RotateTransform Angle="-90" />
                            </Ellipse.RenderTransform>
                            <Ellipse.StrokeDashArray>
                                <MultiBinding Converter="{StaticResource Style3Arc}">
                                    <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
                                </MultiBinding>
                            </Ellipse.StrokeDashArray>
                        </Ellipse>
                        <TextBlock
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="20"
                            Foreground="#01acff"
                            Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CircleProgressBar5" TargetType="{x:Type ProgressBar}">
        <Setter Property="Width" Value="100" />
        <Setter Property="Height" Value="100" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <Grid>
                        <Rectangle
                            Fill="#ef426f"
                            RadiusX="5"
                            RadiusY="5"
                            Visibility="Collapsed" />
                        <Ellipse
                            Width="80"
                            Height="80"
                            Stroke="#7F15806C"
                            StrokeThickness="10" />
                        <Ellipse
                            Width="80"
                            Height="80"
                            RenderTransformOrigin="0.5,0.5"
                            Stroke="#CC19910D"
                            StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}"
                            StrokeThickness="10">
                            <Ellipse.RenderTransform>
                                <RotateTransform Angle="-90" />
                            </Ellipse.RenderTransform>
                            <Ellipse.StrokeDashArray>
                                <MultiBinding Converter="{StaticResource Style3Arc}">
                                    <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
                                </MultiBinding>
                            </Ellipse.StrokeDashArray>
                        </Ellipse>
                        <TextBlock
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="20"
                            Foreground="#CC19910D"
                            Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CircleProgressBar4" TargetType="{x:Type ProgressBar}">
        <Setter Property="Width" Value="100" />
        <Setter Property="Height" Value="100" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <Grid>
                        <Rectangle
                            Fill="#ef426f"
                            RadiusX="5"
                            RadiusY="5"
                            Visibility="Collapsed" />
                        <Ellipse
                            Width="80"
                            Height="80"
                            Stroke="#CC3E0B0B"
                            StrokeThickness="10" />
                        <Ellipse
                            Width="80"
                            Height="80"
                            RenderTransformOrigin="0.5,0.5"
                            Stroke="#CCAC1919"
                            StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}"
                            StrokeThickness="10">
                            <Ellipse.RenderTransform>
                                <RotateTransform Angle="-90" />
                            </Ellipse.RenderTransform>
                            <Ellipse.StrokeDashArray>
                                <MultiBinding Converter="{StaticResource Style3Arc}">
                                    <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
                                </MultiBinding>
                            </Ellipse.StrokeDashArray>
                        </Ellipse>
                        <TextBlock
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            FontSize="20"
                            Foreground="#CCAC1919"
                            Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region Expander-->
    <ImageBrush x:Key="leftImage" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
    <ImageBrush x:Key="leftImageSub" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
    <ImageBrush x:Key="topImage" ImageSource="/BPASmartClient.CustomResource;component/Image/topImage.png" />
    <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Height" Value="80" />
        <Setter Property="HorizontalContentAlignment" Value="Right" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="10,10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid>
                        <Border
                            x:Name="border2"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Background="{TemplateBinding Background}">
                            <ContentPresenter
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" Value="#FFd2e7f4" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImage}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="border2" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="White" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="false" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="border2" Property="Background">
                                    <Setter.Value>
                                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                                    </Setter.Value>
                                </Setter>
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <DockPanel Cursor="Hand">
                        <ToggleButton
                            x:Name="HeaderSite"
                            Height="60"
                            MinWidth="0"
                            MinHeight="0"
                            Margin="1"
                            Padding="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Header}"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                            DockPanel.Dock="Top"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            FontStretch="{TemplateBinding FontStretch}"
                            FontStyle="{TemplateBinding FontStyle}"
                            FontWeight="{TemplateBinding FontWeight}"
                            Foreground="{TemplateBinding Foreground}"
                            IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            Style="{StaticResource ToggleButtonStyle}" />
                        <ContentPresenter
                            x:Name="ExpandSite"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            DockPanel.Dock="Left"
                            Focusable="false"
                            Visibility="Collapsed" />
                    </DockPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="true">
                            <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region RadioButton-->
    <Style x:Key="RadioMiniButtonStyle" TargetType="{x:Type RadioButton}">
        <Setter Property="Margin" Value="5,10,1,0" />
        <Setter Property="Width" Value="160" />
        <Setter Property="Height" Value="30" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontFamily" Value="粗体" />
        <Setter Property="Foreground" Value="#DDD" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="#DDD" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid
                        x:Name="templateRoot"
                        Background="Transparent"
                        SnapsToDevicePixels="True">
                        <Border x:Name="border2" />
                        <ContentPresenter
                            x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Focusable="False"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="True">
                            <Setter Property="FocusVisualStyle">
                                <Setter.Value>
                                    <Style>
                                        <Setter Property="Control.Template">
                                            <Setter.Value>
                                                <ControlTemplate>
                                                    <Rectangle
                                                        Margin="14,0,0,0"
                                                        SnapsToDevicePixels="True"
                                                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                                        StrokeDashArray="1 2"
                                                        StrokeThickness="1" />
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Padding" Value="4,-1,0,0" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}" />

                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Foreground" Value="White" />
                            <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImageSub}" />
                        </Trigger>

                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="border2" Property="Background">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="#4B8EC4" />
                        </Trigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="false" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="border2" Property="Background">
                                    <Setter.Value>
                                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
                                    </Setter.Value>
                                </Setter>
                            </MultiTrigger.Setters>
                        </MultiTrigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--#endregion-->

    <!--#region ContextMenu-->
    <!--  自定义ContextMenu的外观样式  -->
    <Style TargetType="{x:Type ContextMenu}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Grid.IsSharedSizeScope" Value="True" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="HasDropShadow" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <Border
                        Name="Border"
                        Background="#6EA0B0"
                        BorderBrush="#888888"
                        BorderThickness="1">
                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow" Value="true">
                            <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" />
                            <Setter TargetName="Border" Property="CornerRadius" Value="4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  自定义菜单项之间的分隔符的样式  -->
    <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
        <Setter Property="Height" Value="1" />
        <Setter Property="Margin" Value="0,4,0,4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border>
                        <Border.Background>
                            <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
                        </Border.Background>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Separator1" TargetType="{x:Type Separator}">
        <Setter Property="Height" Value="1" />
        <Setter Property="Margin" Value="0,4,0,4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border>
                        <Border.Background>
                            <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
                        </Border.Background>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  TopLevelHeader  -->
    <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
        <Border Name="Border" Cursor="Hand">
            <Grid Margin="30,10,30,5">
                <ContentPresenter
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    ContentSource="Header"
                    RecognizesAccessKey="True" />
                <Popup
                    Name="Popup"
                    AllowsTransparency="True"
                    Focusable="False"
                    HorizontalOffset="-30"
                    IsOpen="{TemplateBinding IsSubmenuOpen}"
                    Placement="Bottom"
                    PopupAnimation="Slide"
                    VerticalOffset="10">
                    <Border
                        Name="SubmenuBorder"
                        Background="#7F0E4E8D"
                        BorderBrush="Transparent"
                        BorderThickness="1"
                        SnapsToDevicePixels="True">
                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Border>
                </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                <Setter TargetName="Popup" Property="PopupAnimation" Value="None" />
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="#8f723c" />
                <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
                <Setter TargetName="SubmenuBorder" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="false">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White" />
                <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
                <Setter TargetName="SubmenuBorder" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
                <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0" />
                <Setter TargetName="SubmenuBorder" Property="Padding" Value="5" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="#ffffffff" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--  TopLevelItem  -->
    <ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
        <Border Name="Border" Margin="30,0,0,0">
            <Grid>
                <ContentPresenter
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    ContentSource="Header"
                    RecognizesAccessKey="True" />
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
                    </Setter.Value>
                </Setter>
                <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="#ffffffff" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--  SubmenuItem 自定义菜单项的外观样式  -->
    <ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
        <Border
            Name="Border"
            Margin="5"
            Cursor="Hand">
            <Grid Margin="5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
                    <ColumnDefinition Width="13" />
                </Grid.ColumnDefinitions>
                <ContentPresenter
                    Name="Icon"
                    Margin="6,2,6,2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    ContentSource="Icon" />
                <Border
                    Name="Check"
                    Width="13"
                    Height="13"
                    Margin="6,0,6,0"
                    Background="#331068A3"
                    BorderBrush="#331068A3"
                    BorderThickness="1"
                    Visibility="Hidden">
                    <Path
                        Name="CheckMark"
                        Width="7"
                        Height="7"
                        Data="M 0 0 L 7 7 M 0 7 L 7 0"
                        SnapsToDevicePixels="False"
                        Stroke="#331068A3"
                        StrokeThickness="1"
                        Visibility="Visible" />
                </Border>
                <ContentPresenter
                    Name="HeaderHost"
                    Grid.Column="1"
                    ContentSource="Header"
                    RecognizesAccessKey="True" />
                <TextBlock
                    x:Name="InputGestureText"
                    Grid.Column="2"
                    Margin="5,2,0,-5"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Bottom"
                    Background="Transparent"
                    Cursor="Hand"
                    DockPanel.Dock="Right"
                    Text="{TemplateBinding InputGestureText}" />
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter TargetName="CheckMark" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsCheckable" Value="true">
                <Setter TargetName="Check" Property="Visibility" Value="Hidden" />
                <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
            </Trigger>
            <!--  选中菜单项时的高亮颜色的trigger设置  -->
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="#8f723c" />
            </Trigger>
            <Trigger Property="IsHighlighted" Value="false">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White" />
            </Trigger>
            <!--<Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="Yellow"/>
            </Trigger>-->
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--  SubmenuHeader  -->

    <ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
        <Border Name="Border">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
                    <ColumnDefinition Width="13" />
                </Grid.ColumnDefinitions>
                <ContentPresenter
                    Name="Icon"
                    Margin="6,0,6,0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    ContentSource="Icon" />
                <ContentPresenter
                    Name="HeaderHost"
                    Grid.Column="1"
                    ContentSource="Header"
                    RecognizesAccessKey="True" />
                <TextBlock
                    x:Name="InputGestureText"
                    Grid.Column="2"
                    Margin="5,2,2,2"
                    DockPanel.Dock="Right"
                    Text="{TemplateBinding InputGestureText}" />
                <Path
                    Grid.Column="3"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Data="M 0 0 L 0 7 L 4 3.5 Z"
                    Fill="#331068A3" />
                <Popup
                    Name="Popup"
                    AllowsTransparency="True"
                    Focusable="False"
                    HorizontalOffset="-4"
                    IsOpen="{TemplateBinding IsSubmenuOpen}"
                    Placement="Left"
                    PopupAnimation="Slide">
                    <Border
                        Name="SubmenuBorder"
                        BorderBrush="Transparent"
                        BorderThickness="1"
                        SnapsToDevicePixels="True">
                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Border>
                </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="false">
                <Setter TargetName="Border" Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
                <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4" />
                <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#ffffffff" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--  MenuItem Style  -->

    <Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}" />
                <Setter Property="Grid.IsSharedSizeScope" Value="true" />
            </Trigger>
            <Trigger Property="Role" Value="TopLevelItem">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}" />
            </Trigger>
            <!--<Trigger Property="Role" Value="SubmenuHeader">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
            </Trigger>-->
            <Trigger Property="Role" Value="SubmenuItem">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <!--#endregion-->

    <!--#region RadioButton-->
    <Style x:Key="CheckRadioFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        Margin="14,0,0,0"
                        SnapsToDevicePixels="true"
                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                        StrokeDashArray="1 2"
                        StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
        <Setter Property="Foreground" Value="{DynamicResource foreground}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/btn_normal.png" />
            </Setter.Value>
        </Setter>
        <Setter Property="Padding" Value="2,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <BulletDecorator VerticalAlignment="Center" Background="Transparent">
                        <BulletDecorator.Bullet>
                            <Grid>
                                <Ellipse
                                    x:Name="Border"
                                    Width="10"
                                    Height="10"
                                    Fill="{TemplateBinding Background}" />
                                <Ellipse
                                    x:Name="Dot"
                                    Width="5"
                                    Height="5"
                                    Fill="#ff8a03"
                                    Visibility="Hidden" />
                            </Grid>

                        </BulletDecorator.Bullet>
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            RecognizesAccessKey="True" />
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                            <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region CheckBox-->
    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="Foreground" Value="{DynamicResource foreground}" />
        <Setter Property="Background" Value="#FFF4F4F4" />
        <Setter Property="BorderBrush" Value="#FF8E8F8F" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle
                                    Margin="1"
                                    SnapsToDevicePixels="True"
                                    Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                    StrokeDashArray="1 2"
                                    StrokeThickness="1" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <StackPanel
                        Background="Transparent"
                        Orientation="Horizontal"
                        SnapsToDevicePixels="True">
                        <Grid>
                            <Image
                                Width="12"
                                Height="14"
                                Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
                            <Image
                                x:Name="image1"
                                Width="12"
                                Height="14"
                                Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
                        </Grid>
                        <ContentPresenter
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="True">
                            <Setter Property="FocusVisualStyle">
                                <Setter.Value>
                                    <Style>
                                        <Setter Property="Control.Template">
                                            <Setter.Value>
                                                <ControlTemplate>
                                                    <Rectangle
                                                        Margin="14,0,0,0"
                                                        SnapsToDevicePixels="True"
                                                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                                        StrokeDashArray="1 2"
                                                        StrokeThickness="1" />
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Padding" Value="4,0,0,0" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_Checked.png" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region TextBox-->
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Foreground" Value="{DynamicResource foreground}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="24" />
        <Setter Property="CaretBrush" Value="White" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Themes1:ClassicBorderDecorator
                        x:Name="Bd"
                        BorderBrush="#08335f"
                        BorderStyle="None"
                        BorderThickness="1">
                        <ScrollViewer x:Name="PART_ContentHost" />
                    </Themes1:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
                    <Condition Property="IsSelectionActive" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>

    <!--#endregion-->

    <!--#region ComboBox-->
    <Style x:Key="ComboBoxFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        Margin="4,4,21,4"
                        SnapsToDevicePixels="true"
                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                        StrokeDashArray="1 2"
                        StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
    <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="Width" Value="Auto" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <DockPanel
                        Background="{TemplateBinding Background}"
                        LastChildFill="false"
                        SnapsToDevicePixels="true">
                        <Themes1:ClassicBorderDecorator
                            x:Name="Border"
                            Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderStyle="None"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            DockPanel.Dock="Right">
                            <Path
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Data="{StaticResource DownArrowGeometry}"
                                Fill="{TemplateBinding Foreground}" />
                        </Themes1:ClassicBorderDecorator>
                    </DockPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="Foreground" Value="{DynamicResource foreground}" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <ScrollViewer
                        x:Name="PART_ContentHost"
                        Background="Transparent"
                        Focusable="false"
                        HorizontalScrollBarVisibility="Hidden"
                        VerticalScrollBarVisibility="Hidden" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
        <Border
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="true">
            <Grid>
                <Themes1:ClassicBorderDecorator
                    x:Name="Border"
                    BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
                    BorderStyle="None"
                    BorderThickness="2">
                    <Popup
                        x:Name="PART_Popup"
                        AllowsTransparency="true"
                        Focusable="False"
                        IsOpen="{TemplateBinding IsDropDownOpen}"
                        Placement="Bottom"
                        PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                        <Themes1:SystemDropShadowChrome
                            x:Name="Shdw"
                            MinWidth="{Binding ActualWidth, ElementName=Border}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Color="Transparent">
                            <Border
                                x:Name="DropDownBorder"
                                BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
                                BorderThickness="1">
                                <Border.Background>
                                    <ImageBrush
                                        ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"
                                        Opacity="0.5"
                                        Stretch="Fill" />
                                </Border.Background>
                                <ScrollViewer x:Name="DropDownScrollViewer">
                                    <Grid RenderOptions.ClearTypeHint="Enabled">
                                        <Canvas
                                            Width="0"
                                            Height="0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top">
                                            <Rectangle
                                                x:Name="OpaqueRect"
                                                Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                                Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                                Fill="{Binding Background, ElementName=DropDownBorder}" />
                                        </Canvas>
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </Grid>
                                </ScrollViewer>
                            </Border>
                        </Themes1:SystemDropShadowChrome>
                    </Popup>
                </Themes1:ClassicBorderDecorator>
                <ToggleButton
                    Width="Auto"
                    MinWidth="0"
                    MinHeight="0"
                    ClickMode="Press"
                    Focusable="false"
                    IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Style="{StaticResource ComboBoxTransparentButtonStyle}" />
                <DockPanel>
                    <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
                    <TextBox
                        x:Name="PART_EditableTextBox"
                        Margin="{TemplateBinding Padding}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                        Style="{StaticResource ComboBoxEditableTextBox}" />
                </DockPanel>

            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
                <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
                <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping" Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </MultiTrigger>
            <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="#08335f" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Height" Value="24" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="IsTextSearchCaseSensitive" Value="true" />
        <Setter Property="IsEditable" Value="true" />
        <Setter Property="StaysOpenOnEdit" Value="true" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">

                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <Grid>
                            <Themes1:ClassicBorderDecorator
                                x:Name="Border"
                                BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
                                BorderStyle="None"
                                BorderThickness="2">
                                <Popup
                                    x:Name="PART_Popup"
                                    AllowsTransparency="true"
                                    Focusable="False"
                                    IsOpen="{TemplateBinding IsDropDownOpen}"
                                    Placement="Bottom"
                                    PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                                    <Themes1:SystemDropShadowChrome
                                        x:Name="Shdw"
                                        MinWidth="{Binding ActualWidth, ElementName=Border}"
                                        MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                        Color="Transparent">
                                        <Border
                                            x:Name="DropDownBorder"
                                            BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
                                            BorderThickness="1">
                                            <Border.Background>
                                                <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
                                            </Border.Background>
                                            <ScrollViewer x:Name="DropDownScrollViewer">
                                                <Grid RenderOptions.ClearTypeHint="Enabled">
                                                    <Canvas
                                                        Width="0"
                                                        Height="0"
                                                        HorizontalAlignment="Left"
                                                        VerticalAlignment="Top">
                                                        <Rectangle
                                                            x:Name="OpaqueRect"
                                                            Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                                            Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                                            Fill="{Binding Background, ElementName=DropDownBorder}" />
                                                    </Canvas>
                                                    <ItemsPresenter
                                                        x:Name="ItemsPresenter"
                                                        KeyboardNavigation.DirectionalNavigation="Contained"
                                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                                </Grid>
                                            </ScrollViewer>
                                        </Border>
                                    </Themes1:SystemDropShadowChrome>
                                </Popup>
                            </Themes1:ClassicBorderDecorator>
                            <DockPanel Margin="2">
                                <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
                                <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
                                    <ContentPresenter
                                        Margin="1,1,1,1"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        Content="{TemplateBinding SelectionBoxItem}"
                                        ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                                        ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                                        ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </Border>
                            </DockPanel>
                            <ToggleButton
                                Width="Auto"
                                MinWidth="0"
                                MinHeight="0"
                                Margin="2"
                                ClickMode="Press"
                                Focusable="false"
                                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ComboBoxTransparentButtonStyle}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
                                <Condition Property="IsDropDownOpen" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
                        </MultiTrigger>
                        <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
                            <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>-->
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsGrouping" Value="true" />
                                <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </MultiTrigger>
                        <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
                            <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
                            <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
                        </Trigger>
                        <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                            <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                            <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Padding" Value="1" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>

    </Style>
    <Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" />
    <!--#endregion-->

    <!--#region ColorCommboxStyle-->
    <ObjectDataProvider
        x:Key="colorPropertieOdp"
        MethodName="GetProperties"
        ObjectInstance="{x:Type Colors}" />
    <Style
        x:Key="ColorCommboxStyle"
        BasedOn="{StaticResource BaseComboBoxStyle}"
        TargetType="ComboBox">
        <Setter Property="IsTextSearchCaseSensitive" Value="False" />
        <Setter Property="IsEditable" Value="False" />
        <Setter Property="StaysOpenOnEdit" Value="False" />
        <Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}" />
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Rectangle
                            Width="40"
                            Height="10"
                            Fill="{Binding Name}" />
                        <TextBlock Text="{Binding Name}" />
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->


</ResourceDictionary>