<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:local="clr-namespace:CustomThemeBasedOnOfficeBlack_GridWpf;assembly=CustomThemeBasedOnOfficeBlack_GridWpf"
        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>
    

    <ControlTemplate x:Key="GridViewDataControlTemplate" TargetType="grid:GridViewDataControl">
        <Grid>
        <Border Background="{TemplateBinding Background}">
            <grid:GridViewItemsControl 
                MaxHeight="300"
                x:Name="PART_RootItemsControl"
                
				ParentRow="{TemplateBinding ParentRow}"
				ScrollMode="{TemplateBinding ScrollMode}"
                Margin="{TemplateBinding Margin}"
				ShowColumnHeaders="{TemplateBinding ShowColumnHeaders}"
                ShowGroupPanel="{TemplateBinding ShowGroupPanel}"
                Background="{TemplateBinding Background}"
				BorderBrush="{TemplateBinding BorderBrush}"
				BorderThickness="{TemplateBinding BorderThickness}"
                GroupPanelBackground="{TemplateBinding Background}"
                GroupPanelForeground="{TemplateBinding Foreground}"
				MinHeight="{TemplateBinding MinHeight}"
                />
        </Border>
       <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"   />
        
        </Grid>
        
        <ControlTemplate.Triggers>
            <Trigger Property="IsBusy" Value="True">
                <Setter TargetName="PART_GridViewLoadingIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsBusy" Value="False">
                <Setter TargetName="PART_GridViewLoadingIndicator" Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </ControlTemplate.Triggers>
        
    </ControlTemplate>

    <Style 
        
        x:Key="{telerik:ThemeResourceKey ThemeType=local:CustomTheme, ElementType=grid:GridViewDataControl}"
        
        TargetType="grid:GridViewDataControl">

        <Setter Property="Template" Value="{StaticResource GridViewDataControlTemplate}" />
        <Setter Property="VerticalGridlinesBrush" Value="{StaticResource GridViewCellBorderBrush}" />
		
		<!--Properties for GroupPanel when IN hierarchy-->
		<Setter Property="BorderBrush" Value="{StaticResource HierarchyChildPresenterBackground}" />
		<Setter Property="BorderThickness" Value="0,0,0,1" />
		<Setter Property="MinHeight" Value="26" />
		<Setter Property="Margin" Value="17,0,17,18" />
    </Style>
    
</ResourceDictionary>