<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:CustomTheme;assembly=CustomTheme"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    
    
    xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
    xmlns:controls="clr-namespace:Telerik.Windows.Controls"
    
     >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
        <grid:GridViewHeaderIndentCell />
    </DataTemplate>

    <ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="grid:GridViewHeaderRow">
        <Border x:Name="PART_GridViewHeaderRowBorder" 
				BorderBrush="{TemplateBinding BorderBrush}" 
				BorderThickness="{TemplateBinding BorderThickness}" 
				Background="{TemplateBinding Background}"
				MinHeight="{TemplateBinding MinHeight}"
				Margin="{TemplateBinding Margin}" 
				Padding="{TemplateBinding Padding}">

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <grid:IndicatorPresenter x:Name="PART_IndicatorPresenter" Visibility="{TemplateBinding RowIndicatorVisibility}" Grid.Column="0" VerticalAlignment="Stretch"  
										 MinHeight="{TemplateBinding MinHeight}" SnapsToDevicePixels="True" />

                <grid:IndentPresenter x:Name="PART_IndentPresenter" IndentLevel="{TemplateBinding IndentLevel}" ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}"
									  Grid.Column="1" 
									  BorderBrush="{TemplateBinding BorderBrush}" 
									  BorderThickness="{TemplateBinding BorderThickness}" 
									  Background="{TemplateBinding Background}"
									  MinHeight="{TemplateBinding MinHeight}"
									  Margin="{TemplateBinding Margin}" />

                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" 
                                     Background="{StaticResource GridViewHeaderRowDataCellsPresenterBackground}" Grid.Column="2" MinHeight="{TemplateBinding MinHeight}"
                                     />
            </Grid>
        </Border>
    </ControlTemplate>

    <Style 
        
        x:Key="{telerik:ThemeResourceKey ThemeType=local:MyCustomTheme, ElementType=grid:GridViewHeaderRow}"
        
        TargetType="grid:GridViewHeaderRow">
        <Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}" />
        <Setter Property="Background" Value="{StaticResource GridViewHeaderCellInnerBorderBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource GridViewHeaderCellBorderBrush}" />
        <Setter Property="BorderThickness" Value="0,0,0,1" />
        <Setter Property="MinHeight" Value="26" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
    </Style>
    
</ResourceDictionary>