<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:CustomThemeBasedOnOfficeBlack_GridWpf;assembly=CustomThemeBasedOnOfficeBlack_GridWpf"
        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}" 
				Background="{TemplateBinding Background}"
				BorderThickness="{TemplateBinding BorderThickness}"
				MinHeight="{TemplateBinding MinHeight}"
				Margin="{TemplateBinding Margin}"
				Padding="{TemplateBinding Padding}">

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

				<Border BorderBrush="#FFEEEEEE" Grid.ColumnSpan="3"
						BorderThickness="0,0,1,1" 
						Background="{TemplateBinding Background}"/>
				
				<grid:IndicatorPresenter x:Name="PART_IndicatorPresenter"
										 MinHeight="{TemplateBinding MinHeight}"
										  
										 Visibility="{TemplateBinding RowIndicatorVisibility}" 
										 Grid.Column="0" />
				
				<grid:IndentPresenter x:Name="PART_IndentPresenter" MinHeight="{TemplateBinding MinHeight}"
									  
									  IndentLevel="{TemplateBinding IndentLevel}"
									  ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}" 
									  Grid.Column="1" />
				
				<grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" MinHeight="{TemplateBinding MinHeight}"
										 
										 Background="{StaticResource GridViewHeaderRowDataCellsPresenterBackground}" 
										 Grid.Column="2" />
			</Grid>
        </Border>
    </ControlTemplate>

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