<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ModernWpf.Controls"
    xmlns:primitives="clr-namespace:ModernWpf.Controls.Primitives">

    <Style TargetType="local:ListViewHeaderItem">
        <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{DynamicResource ListViewHeaderItemThemeFontSize}" />
        <Setter Property="Background" Value="{DynamicResource ListViewHeaderItemBackground}" />
        <Setter Property="Margin" Value="0,0,0,4" />
        <Setter Property="Padding" Value="12,8,12,0" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="MinHeight" Value="{DynamicResource ListViewHeaderItemMinHeight}" />
        <Setter Property="UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ListViewHeaderItem">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}"
                        SnapsToDevicePixels="True">
                        <StackPanel>
                            <ContentPresenter
                                x:Name="ContentPresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <Rectangle
                                Stroke="{DynamicResource ListViewHeaderItemDividerStroke}"
                                StrokeThickness="0.5"
                                Height="1"
                                VerticalAlignment="Bottom"
                                HorizontalAlignment="Stretch"
                                Margin="12,8,12,0" />
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>