<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:CustomTheme;assembly=CustomTheme"
        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 x:Name="PART_RootItemsControl"  ParentRow="{TemplateBinding ParentRow}" ScrollMode="{TemplateBinding ScrollMode}" ShowColumnHeaders="{TemplateBinding ShowColumnHeaders}" ShowGroupPanel="{TemplateBinding ShowGroupPanel}"
										   MaxHeight="300"
										   Foreground="{TemplateBinding Foreground}"
										   Background="{TemplateBinding Background}"
										   GroupPanelBackground="{TemplateBinding Background}"
										   GroupPanelForeground="{TemplateBinding Foreground}"
										   MinHeight="{TemplateBinding MinHeight}"
										   Margin="{TemplateBinding Margin}"
										   BorderBrush="{TemplateBinding BorderBrush}" 
										   BorderThickness="{TemplateBinding BorderThickness}"/>

            </Border>
            <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"  Visibility="Collapsed" />


        </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:MyCustomTheme, ElementType=grid:GridViewDataControl}"
        
        TargetType="grid:GridViewDataControl">

        <Setter Property="Template" Value="{StaticResource GridViewDataControlTemplate}" />
        <Setter Property="VerticalGridlinesBrush" Value="{StaticResource GridViewGridLinesBrush}" />
        <Setter Property="MinHeight" Value="26" />
        <Setter Property="Margin" Value="19,0,19,19" />
        <Setter Property="BorderBrush" Value="{StaticResource GridViewExpandableRowExpandSiteBorderBrush}" />
        <Setter Property="BorderThickness" Value="0,0,0,0" />
        <Setter Property="Background" Value="{StaticResource GridViewDataControlBackground}" />
    </Style>
    
</ResourceDictionary>