<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;assembly=Telerik.Windows.Controls.GridView"
    
     >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <ControlTemplate x:Key="RadGridViewTemplate" TargetType="controls:RadGridView">
        
        <AdornerDecorator>
            
            
            <Border Name="PART_MasterGridContainer">
                <Grid>
              <grid:GridViewItemsControl 
                    x:Name="PART_RootItemsControl" 
                    Background="{TemplateBinding Background}"
					ParentRow="{TemplateBinding ParentRow}"
					ScrollMode ="{TemplateBinding ScrollMode}"
					ShowColumnHeaders="{TemplateBinding ShowColumnHeaders}"
                    ShowGroupPanel="{TemplateBinding ShowGroupPanel}"
                    
                    />
           
                <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"  Visibility="Collapsed"  />

            </Grid>
                
            </Border>
            
            </AdornerDecorator>
         <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=controls:RadGridView}"
        
        TargetType="controls:RadGridView">

        <Setter Property="Template" Value="{StaticResource RadGridViewTemplate}" />
        <Setter Property="VerticalGridlinesBrush" Value="{StaticResource GridViewCellBorderBrush}" />
        <Setter Property="Background" Value="{StaticResource GridViewBackgroundItemBackground}" />

    </Style>


</ResourceDictionary>