<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="RadGridViewTemplate" TargetType="controls:RadGridView">
		
		<AdornerDecorator>
			

			<Border Name="PART_MasterGridContainer" 
					BorderBrush="{TemplateBinding BorderBrush}"
					BorderThickness="{TemplateBinding BorderThickness}"
					Padding="{TemplateBinding Padding}">

				<Grid Background="{TemplateBinding Background}" x:Name="HierrarchyBackground">
					<Grid.RowDefinitions>
						<RowDefinition Height="Auto" />
						<RowDefinition x:Name="PART_AttachedBehaviorRow" Height="Auto" />
						<RowDefinition />
						<RowDefinition x:Name="ScrollBarRow" MinHeight="0" Height="0"/>
						<RowDefinition Height="Auto" />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition />
						<ColumnDefinition x:Name="ScrollBarColumn" MinWidth="0" Width="0"/>
					</Grid.ColumnDefinitions>

					<grid:GridViewGroupPanel x:Name="PART_GroupPanel" Grid.Row="0" Grid.ColumnSpan="2" telerik:StyleManager.Theme="{StaticResource Theme}"
											 Background="{TemplateBinding GroupPanelBackground}"
											 Foreground="{TemplateBinding GroupPanelForeground}" 
											 BorderBrush="{StaticResource GridView_GroupPanelOuterBorder}" />

					<grid:GridViewScrollViewer x:Name="PART_ItemsScrollViewer" Background="Transparent"
                                       CanContentScroll="True" telerik:StyleManager.Theme="{StaticResource Theme}"
									   Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="2">
						<grid:GridViewScrollViewer.HeaderRow>
							<grid:GridViewHeaderRow x:Name="PART_HeaderRow"
                                    telerik:StyleManager.Theme="{StaticResource Theme}"
                                    IndentLevel="{TemplateBinding GroupCount}" />
						</grid:GridViewScrollViewer.HeaderRow>
						<grid:GridViewScrollViewer.NewRow>
							<grid:GridViewNewRow Name="PART_AddNewRow" 
                                     telerik:StyleManager.Theme="{StaticResource Theme}"
                                     IndentLevel="{TemplateBinding GroupCount}"
                                     Visibility="Collapsed" />
						</grid:GridViewScrollViewer.NewRow>
						<grid:GridViewScrollViewer.FooterRow>
							<grid:GridViewFooterRow x:Name="PART_FooterRow"
                                    telerik:StyleManager.Theme="{StaticResource Theme}"
                                    IndentLevel="{TemplateBinding GroupCount}" />
						</grid:GridViewScrollViewer.FooterRow>
						<grid:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel" />
					</grid:GridViewScrollViewer>

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

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

					<grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator" Visibility="Collapsed" telerik:StyleManager.Theme="{StaticResource Theme}"
												   Grid.RowSpan="4" Grid.ColumnSpan="2" />



				</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>
			<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>
			<Trigger Property="ComputedVerticalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed">
				<Setter Property="Width" TargetName="ScrollBarColumn" Value="0" />
			</Trigger>
			<Trigger Property="ComputedHorizontalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed">
				<Setter Property="Height" TargetName="ScrollBarRow" Value="0" />
				<Setter Property="Grid.RowSpan" TargetName="PART_ItemsScrollViewer" Value="1" />
			</Trigger>
			<Trigger Property="ShowInsertRow" Value="True">
				<Setter TargetName="PART_AddNewRow" Property="Visibility" Value="Visible" />
			</Trigger>
		</ControlTemplate.Triggers>
		
	</ControlTemplate>


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

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

		<Setter Property="Background" Value="{StaticResource ControlBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
		<Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
		<Setter Property="BorderThickness" Value="1" />
		<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="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
		
		<Setter Property="SnapsToDevicePixels" Value="True" />
		
	</Style>

	
	
</ResourceDictionary>