<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:dhcc="http://www.dhcc.com.cn">
    <Color x:Key="ControlMouseOverColor">#FF3843C4</Color>

    <!--  Button样式和模板  -->
    <Style x:Key="{ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border BorderBrush="{DynamicResource DataGridColumnHeader_Normal_BorderBrush}" BorderThickness="0,0,1,1">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver" />
                                    <VisualState x:Name="Pressed" />
                                    <VisualState x:Name="Disabled" />
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>

                            <Rectangle x:Name="Border"
                                       Fill="{DynamicResource DataGridColumnHeader_Normal_Background}"
                                       SnapsToDevicePixels="True" />
                            <Polygon x:Name="Arrow"
                                     Margin="8,8,3,3"
                                     HorizontalAlignment="Right"
                                     VerticalAlignment="Bottom"
                                     Fill="Black"
                                     Opacity="0.35"
                                     Points="0,10 10,10 10,0"
                                     Stretch="Uniform" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  Button样式和模板  -->
    <Style x:Key="DataGridShowButton" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border BorderBrush="{DynamicResource DataGridColumnHeader_Normal_BorderBrush}" BorderThickness="0,0,1,1">
                        <Grid>
                            

                            <Rectangle x:Name="Border"
                                       Fill="{DynamicResource DataGridColumnHeader_Normal_Background}"
                                       SnapsToDevicePixels="True" />
                            <Polygon x:Name="Arrow"
                                     Margin="2"
                                     HorizontalAlignment="Center"
                                     VerticalAlignment="Center"
                                     Fill="Black"
                                     Opacity="0.35"
                                     Points="5,0 0,5 5,10 10,5"
                                     Stretch="Uniform" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  DataGrid样式和模板  -->
    <Style BasedOn="{StaticResource {x:Type DataGrid}}" TargetType="{x:Type DataGrid}">
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="BorderBrush" Value="{DynamicResource DataGrid_Normal_BorderBrush}" />
        <Setter Property="BorderThickness" Value="{DynamicResource DataGrid_Normal_BorderThickness}" />
        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource DataGrid_Normal_HorizontalGridLinesBrush}" />
        <Setter Property="VerticalGridLinesBrush" Value="{DynamicResource DataGrid_Normal_VerticalGridLinesBrush}" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="CanUserResizeRows" Value="False" />
        <Setter Property="Background" Value="{DynamicResource DataGrid_Normal_Background}" />
        <Setter Property="AlternationCount" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGrid}">
                    <Border x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            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 x:Name="DataGridButton"
                                                Width="{Binding CellsPanelHorizontalOffset,
                                                                RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
                                                Command="{x:Static DataGrid.SelectAllCommand}"
                                                Focusable="false"
                                                Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle,
                                                                                              TypeInTargetAssembly={x:Type DataGrid}}}"
                                                Visibility="Visible" />
                                        <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter"
                                                                        Grid.Column="1"
                                                                        Background="{DynamicResource DataGridColumnHeader_Normal_Background}"
                                                                        Visibility="{Binding HeadersVisibility,
                                                                                             ConverterParameter={x:Static DataGridHeadersVisibility.Column},
                                                                                             Converter={x:Static DataGrid.HeadersVisibilityConverter},
                                                                                             RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
                                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                                                Grid.Row="1"
                                                                Grid.ColumnSpan="2"
                                                                CanContentScroll="{TemplateBinding CanContentScroll}" />
                                        <ScrollBar x:Name="PART_VerticalScrollBar"
                                                   Grid.Row="0"
                                                   Grid.RowSpan="2"
                                                   Grid.Column="2"
                                                   Maximum="{TemplateBinding ScrollableHeight}"
                                                   Orientation="Vertical"
                                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                                   Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                                   Value="{Binding VerticalOffset,
                                                                   Mode=OneWay,
                                                                   RelativeSource={RelativeSource TemplatedParent}}" />
                                        <Grid Grid.Row="2" Grid.Column="1">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
                                                <ColumnDefinition Width="*" />
                                            </Grid.ColumnDefinitions>

                                            <ScrollBar x:Name="PART_HorizontalScrollBar"
                                                       Grid.Column="1"
                                                       Maximum="{TemplateBinding ScrollableWidth}"
                                                       Orientation="Horizontal"
                                                       ViewportSize="{TemplateBinding ViewportWidth}"
                                                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                                       Value="{Binding HorizontalOffset,
                                                                       Mode=OneWay,
                                                                       RelativeSource={RelativeSource TemplatedParent}}" />
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ScrollViewer.Template>
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsGrouping" Value="true">
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Background" Value="{DynamicResource DataGrid_Enable_Background}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--  DataGridCell样式和模板  -->
    <Style TargetType="{x:Type DataGridCell}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridCell}">
                    <Border x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="0"
                            Padding="2"
                            SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CurrentStates">
                                <VisualState x:Name="Regular" />
                                <VisualState x:Name="Current">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="#75A1AE" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                          VerticalAlignment="Center"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="BorderBrush" Value="#B4C8D5" />
                        </Trigger>
                    </ControlTemplate.Triggers>

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

    <!--  DataGridRow样式和模板  -->
    <Style TargetType="{x:Type DataGridRow}">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Offset="0" Color="{DynamicResource DataGridRow_Normal_Background0}" />
                    <GradientStop Offset="1" Color="{DynamicResource DataGridRow_Normal_Background1}" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Height" Value="23" />
        <Setter Property="ValidationErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <Ellipse Width="12"
                                 Height="12"
                                 Fill="Red"
                                 Stroke="Black"
                                 StrokeThickness="0.5" />
                        <TextBlock Margin="0"
                                   VerticalAlignment="Top"
                                   FontWeight="Bold"
                                   Foreground="White"
                                   Padding="4,0,0,0"
                                   Text="!"
                                   ToolTip="{Binding RelativeSource={RelativeSource FindAncestor,
                                                                                    AncestorType={x:Type DataGridRow}},
                                                     Path=(Validation.Errors)[0].ErrorContent}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{DynamicResource DataGridRow_Normal_BorderBrush}" />
        <Setter Property="BorderThickness" Value="{DynamicResource DataGridRow_Normal_BorderThickness}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridRow}">
                    <Border x:Name="DGR_Border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Normal_AlternatingRow">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource DataGridRow_Normal_AlternatingRow0}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource DataGridRow_Normal_AlternatingRow1}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal_Selected">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource DataGridRow_Select_Background0}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource DataGridRow_Select_Background1}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource DataGridRow_MouseOver_Background0}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource DataGridRow_MouseOver_Background1}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <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>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderThickness" Value="{DynamicResource DataGridRow_MouseOver_BorderThickness}" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DataGridRow_MouseOver_BorderBrush}" />
                            <Setter TargetName="DGR_Border" Property="Margin" Value="0,-1,0,0" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="BorderBrush" Value="{DynamicResource DataGridRow_Select_BorderBrush}" />
                            <Setter Property="BorderThickness" Value="{DynamicResource DataGridRow_Select_BorderThickness}" />
                            <Setter TargetName="DGR_Border" Property="Margin" Value="0,-1,0,0" />
                        </Trigger>
                        <Trigger Property="Validation.HasError" Value="true">
                            <Setter Property="BorderThickness" Value="1" />
                            <Setter Property="BorderBrush" Value="Red" />
                            <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  DataGridRowHeader样式和模板  -->
    <Style x:Key="RowHeaderGripperStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Height" Value="8" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Cursor" Value="SizeNS" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DataGridRowHeader}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridRowHeader}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Normal_CurrentRow" />
                                <VisualState x:Name="Unfocused_EditingRow" />
                                <VisualState x:Name="Normal_EditingRow" />
                                <VisualState x:Name="MouseOver">
                                    <!--
                                        <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rowHeaderBorder" Storyboard.TargetProperty="(Panel.Background).                         (GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                        <EasingColorKeyFrame KeyTime="0" Value="{StaticResource ControlMouseOverColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    -->
                                </VisualState>
                                <VisualState x:Name="MouseOver_CurrentRow" />
                                <VisualState x:Name="MouseOver_Unfocused_EditingRow" />
                                <VisualState x:Name="MouseOver_EditingRow" />
                                <VisualState x:Name="MouseOver_Unfocused_Selected" />
                                <VisualState x:Name="MouseOver_Selected" />
                                <VisualState x:Name="MouseOver_Unfocused_CurrentRow_Selected" />
                                <VisualState x:Name="MouseOver_CurrentRow_Selected" />
                                <VisualState x:Name="Unfocused_Selected" />
                                <VisualState x:Name="Unfocused_CurrentRow_Selected" />
                                <VisualState x:Name="Normal_CurrentRow_Selected" />
                                <VisualState x:Name="Normal_Selected" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="rowHeaderBorder"
                                Background="#DBE7EB"
                                BorderBrush="{DynamicResource DataGridRow_Normal_BorderBrush}"
                                BorderThickness="0,0,1,0"
                                Visibility="Visible">
                            <!--
                                <Border.BorderBrush>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                <GradientStop Offset="0" Color="{DynamicResource BorderDarkColor}" />
                                <GradientStop Offset="1" Color="{DynamicResource BorderLightColor}" />
                                </LinearGradientBrush>
                                </Border.BorderBrush>
                            -->
                            <!--
                                <Border.Background>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                <GradientStop Offset="0" Color="{DynamicResource ControlMediumColor}" />
                                <GradientStop Offset="1" Color="{DynamicResource ControlLightColor}" />
                                </LinearGradientBrush>
                                </Border.Background>
                            -->
                            <StackPanel Orientation="Horizontal">
                                <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </StackPanel>
                        </Border>

                        <Thumb x:Name="PART_TopHeaderGripper"
                               VerticalAlignment="Top"
                               Style="{StaticResource RowHeaderGripperStyle}" />
                        <Thumb x:Name="PART_BottomHeaderGripper"
                               VerticalAlignment="Bottom"
                               Style="{StaticResource RowHeaderGripperStyle}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  DataGridColumnHeader样式和模板  -->
    <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Width" Value="8" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Cursor" Value="SizeWE" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DataGridColumnHeader}">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeader_Normal_Foreground}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="{DynamicResource DataGridColumnHeader_Normal_BorderBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderThickness" Value="{DynamicResource DataGridColumnHeader_Normal_BorderThickness}" />
        <Setter Property="Height" Value="27" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                    <Grid>
                        <Border x:Name="columnHeaderBorder"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="3">
                            <!--
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            -->
                            <Grid>
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Grid>
                        </Border>

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

    <!--  DataGridColumnHeadersPresenter样式和模板  -->
    <Style TargetType="{x:Type DataGridColumnHeadersPresenter}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
                    <Grid Background="{TemplateBinding Background}">
                        <DataGridColumnHeader x:Name="PART_FillerColumnHeader"
                                              Background="Red"
                                              IsHitTestVisible="False" />
                        <ItemsPresenter />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  DataBoxBase样式和模板  -->
    <Style BasedOn="{StaticResource {x:Type DataGrid}}" TargetType="{x:Type dhcc:DHCCDataGrid}">
        <Setter Property="dhcc:FocusManager.IsInternalKeyboardControlling" Value="True" />
    </Style>

</ResourceDictionary>