<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:vistaCopy="clr-namespace:VistaThemeCopy"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					
				
					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;assembly=Telerik.Windows.Controls.GridView"
					xmlns:dataPager="clr-namespace:Telerik.Windows.Controls.DataPager;assembly=Telerik.Windows.Controls.GridView"
				
				
			
					>
	
	<vistaCopy:VistaThemeCopyTheme x:Key="Theme" />
<SolidColorBrush x:Key="GridView_GroupPanelOuterBorder" Color="#FF3C7FB1" />
<SolidColorBrush x:Key="ControlBackground" Color="White" />
<SolidColorBrush x:Key="ControlOuterBorder" Color="#FF83A5D2" />
<SolidColorBrush x:Key="ControlForeground" Color="Black" />
<SolidColorBrush x:Key="Item_AlternateBackground" Color="#FFF4F4F4" />
<SolidColorBrush x:Key="GridView_GridLinesItemBorder" Color="#FFB0B0B0" />
<SolidColorBrush x:Key="GridView_GroupPanelBackground" Color="#FFEFF7FC" />
<SolidColorBrush x:Key="GridView_GroupPanelForeground" Color="Black" />

	
	<telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

	<ControlTemplate x:Key="GridViewDataControlTemplate" TargetType="grid:GridViewDataControl">
		<Border Name="PART_MasterGridContainer"
				Background="{TemplateBinding Background}"
				BorderBrush="{TemplateBinding BorderBrush}"
				BorderThickness="{TemplateBinding BorderThickness}"
				VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
				HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
				Padding="{TemplateBinding Padding}">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition />
					<RowDefinition Height="Auto" />
				</Grid.RowDefinitions>

				<grid:GridViewGroupPanel x:Name="PART_GroupPanel" telerik:StyleManager.Theme="{StaticResource Theme}"
										 grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
										 Background="{TemplateBinding GroupPanelBackground}"  
										 Foreground="{TemplateBinding GroupPanelForeground}"
										 BorderBrush="{StaticResource GridView_GroupPanelOuterBorder}"/>

				<StackPanel Grid.Row="1">
					<grid:GridViewHeaderRow x:Name="PART_HeaderRow"
											grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
											telerik:StyleManager.Theme="{StaticResource Theme}" 
											IndentLevel="{TemplateBinding GroupCount}"/>
					<grid:GridViewNewRow Name="PART_AddNewRow" 
										 telerik:StyleManager.Theme="{StaticResource Theme}"
										 VerticalAlignment="Bottom" HorizontalAlignment="Left" IndentLevel="{TemplateBinding GroupCount}"
										 Visibility="Collapsed" />
				</StackPanel>

				<grid:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"  Grid.Row="2" />

				<StackPanel Grid.Row="3">

					<grid:GridViewFooterRow x:Name="PART_FooterRow"
										telerik:StyleManager.Theme="{StaticResource Theme}" 
										IndentLevel="{TemplateBinding GroupCount}"/>
				</StackPanel>

				<grid:ScrollPositionIndicator
                            x:Name="PART_ScrollPositionIndicator"
                            telerik:StyleManager.Theme="{StaticResource Theme}"
                            Margin="0,0,28,0" 
                            IsHitTestVisible="False" HorizontalAlignment="Right" 
                            Grid.Row="2"
                            ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"  
                            Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                            />

				<Border x:Name="PART_FrozenColumnsPreview" Grid.Row="1" Visibility="Collapsed" HorizontalAlignment="Left" Grid.RowSpan="3" Background="#33000000" Width="6"/>

				<grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator" Visibility="Collapsed" telerik:StyleManager.Theme="{StaticResource Theme}" />
			</Grid>
			
		</Border>
		
		<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>
			<Trigger Property="ShowColumnFooters" Value="false">
				<Setter Property="Visibility" Value="Collapsed" TargetName="PART_FooterRow"/>
			</Trigger>
			<Trigger Property="ShowColumnHeaders" Value="false">
				<Setter Property="Visibility" Value="Collapsed" TargetName="PART_HeaderRow"/>
			</Trigger>
			<Trigger Property="ShowGroupPanel" Value="false">
				<Setter Property="Visibility" Value="Collapsed" TargetName="PART_GroupPanel"/>
			</Trigger>
		</ControlTemplate.Triggers>
		
	</ControlTemplate>

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

		<Setter Property="Template" Value="{StaticResource GridViewDataControlTemplate}" />

		<Setter Property="Background" Value="{StaticResource ControlBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Stretch" />
		<Setter Property="Padding" Value="0" />
		<Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
		<Setter Property="AlternateRowBackground" Value="{StaticResource Item_AlternateBackground}" />
		<Setter Property="VerticalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}" />
		<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}" />
		<Setter Property="GroupPanelBackground" Value="{StaticResource GridView_GroupPanelBackground}"/>
		<Setter Property="GroupPanelForeground" Value="{StaticResource GridView_GroupPanelForeground}"/>
		
		<Setter Property="SnapsToDevicePixels" Value="True" />
		
	</Style>
	
	
</ResourceDictionary>