<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"
				
				
			
					>
    
	<SolidColorBrush x:Key="GridViewHeaderCellDropMarkerPenBrush" Color="White" />
<LinearGradientBrush x:Key="GridView_HeaderInnerBorder" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFCFCFC" Offset="0"/>
		<GradientStop Color="#FFE8F5FC" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="GridView_HeaderOuterBorder_Over" Color="#FF3C7FB1" />
<LinearGradientBrush x:Key="GridView_HeaderInnerBorder_Over" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFCFCFC" Offset="0"/>
		<GradientStop Color="#FFE8F5FC" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_HeaderBackground_Over" EndPoint="0.50,0" StartPoint="0.5,1">
		<GradientStop Color="#FF81C3E5" Offset="0"/>
		<GradientStop Color="#FF98D1EF" Offset="0.5"/>
		<GradientStop Color="#FFB4E0F7" Offset="0.51"/>
		<GradientStop Color="#FFBDE4F9" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="GridView_HeaderOuterBorder_Selected" Color="#FF3C7FB1" />
<LinearGradientBrush x:Key="GridView_HeaderInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFCFCFC" Offset="0"/>
		<GradientStop Color="#FFE8F5FC" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_HeaderBackground_Selected" EndPoint="0.5,0" StartPoint="0.5,1">
		<GradientStop Color="#FFD9ECF6" Offset="0"/>
		<GradientStop Color="#FFE1F1F9" Offset="0.5"/>
		<GradientStop Color="#FFF2F9FC" Offset="0.51"/>
		<GradientStop Color="#FFF2F9FC" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_SortIndicatorColor" EndPoint="0.945,0.101" StartPoint="0.055,0.899">
		<GradientStop Color="#FF0F549A" Offset="0.417"/>
		<GradientStop Color="#FF1768BA" Offset="0.634"/>
	</LinearGradientBrush>
<vistaCopy:VistaThemeCopyTheme x:Key="Theme" />
<SolidColorBrush x:Key="GridView_HeaderForeground_Over" Color="Black" />
<SolidColorBrush x:Key="GridView_HeaderForeground_Selected" Color="Black" />
<LinearGradientBrush x:Key="GridView_HeaderBackground" EndPoint="0.5,0" StartPoint="0.5,1">
		<GradientStop Color="#FFB8E5FD" Offset="0"/>
		<GradientStop Color="#FFC6EAFF" Offset="0.5"/>
		<GradientStop Color="#FFD8EFFC" Offset="0.51"/>
		<GradientStop Color="#FFECF8FF" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="GridView_HeaderOuterBorder" Color="#FF3C7FB1" />
<SolidColorBrush x:Key="GridView_HeaderForeground" Color="Black" />

	
	<grid:GridLineWidthToThicknessConverter x:Key="GridLineWidthToThicknessConverter" />

	
	<Pen x:Key="GridViewHeaderCellDropMarkerPen" Brush="{StaticResource GridViewHeaderCellDropMarkerPenBrush}" Thickness="2" />
	
	<Storyboard x:Key="MouseOver">
		<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity">
			<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
		</DoubleAnimationUsingKeyFrames>
	</Storyboard>
	<Storyboard x:Key="MouseOut">
		<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity">
			<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
		</DoubleAnimationUsingKeyFrames>
	</Storyboard>
	

    <Style x:Key="ColumnHeaderGripperStyle" TargetType="Thumb">
        <Setter Property="Width" Value="8"/>
        <Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderBrush" Value="Transparent" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Stretch" />
		<Setter Property="Padding" Value="0" />
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border Padding="{TemplateBinding Padding}" 
							Background="{TemplateBinding Background}" 
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}"
							HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <ControlTemplate x:Key="GridViewHeaderCellTemplate" TargetType="grid:GridViewHeaderCell">
		<Grid x:Name="PART_HeaderCellGrid">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto"  />
			</Grid.ColumnDefinitions>			
			
			
			<Border x:Name="GridViewHeaderCell" Grid.ColumnSpan="2"
					BorderBrush="{TemplateBinding BorderBrush}" 
					BorderThickness="{TemplateBinding BorderThickness}">
				<Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" 
						Background="{TemplateBinding Background}" 
						BorderThickness="1" />
			</Border>			
			<Border x:Name="GridViewHeaderCell_Over" Grid.ColumnSpan="2"
					BorderBrush="{StaticResource GridView_HeaderOuterBorder_Over}" 
					BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" >
				<Border BorderBrush="{StaticResource GridView_HeaderInnerBorder_Over}" 
						Background="{StaticResource GridView_HeaderBackground_Over}" 
						BorderThickness="1" />
			</Border>			
			<Border x:Name="GridViewHeaderCell_Selected" Grid.ColumnSpan="2"
					BorderBrush="{StaticResource GridView_HeaderOuterBorder_Selected}" 
					BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" >
				<Border BorderBrush="{StaticResource GridView_HeaderInnerBorder_Selected}" 
						Background="{StaticResource GridView_HeaderBackground_Selected}" 
						BorderThickness="1" />
			</Border>		

			<ContentControl x:Name="ContentPresenter" Grid.Column="0" Foreground="{TemplateBinding Foreground}"
							Margin="{TemplateBinding Padding}"
                            Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
							VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />

			<Path x:Name="PART_SortIndicator" Grid.ColumnSpan="2"
                          Fill="{StaticResource GridView_SortIndicatorColor}" 
                          Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Top"
						  Margin="0,3,0,0"
                          Data="M0,0 L1,0 2,0 3,0 4,0 5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z"                           
						  Width="5" Height="3"
						  RenderTransformOrigin=".5,.5"
						  Opacity="0">
				<Path.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="-1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Path.RenderTransform>
			</Path>

			<grid:FilteringDropDown Name="PART_DistinctFilterControl" Grid.Column="1"
									Visibility="{TemplateBinding FilteringUIVisibility}"
									telerik:StyleManager.Theme="{StaticResource Theme}" 
									Margin="0,0,8,0"/>
			
			<Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource ColumnHeaderGripperStyle}" Grid.ColumnSpan="2" />
			<Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}" Grid.ColumnSpan="2" />
			
		</Grid>
		
        <ControlTemplate.Triggers>

			<MultiTrigger>
				<Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground_Over}" />
				<MultiTrigger.EnterActions>
					<BeginStoryboard Storyboard="{StaticResource MouseOver}" />
				</MultiTrigger.EnterActions>
				<MultiTrigger.ExitActions>
					<BeginStoryboard Storyboard="{StaticResource MouseOut}" />
				</MultiTrigger.ExitActions>
				<MultiTrigger.Conditions>
					<Condition Property="IsMouseOver" Value="True" />
					<Condition Property="SortingState" Value="None" />
				</MultiTrigger.Conditions>
			</MultiTrigger>
			
			<Trigger Property="SortingState" Value="Ascending">
				<Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground_Selected}" />
                <Setter TargetName="PART_SortIndicator" Property="Opacity" Value="1" />
                <Setter TargetName="PART_SortIndicator" Property="LayoutTransform" >
                    <Setter.Value>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="Opacity" TargetName="GridViewHeaderCell_Selected" Value="1" />
            </Trigger>
            <Trigger Property="SortingState" Value="Descending">
				<Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground_Selected}" />
                <Setter TargetName="PART_SortIndicator" Property="Opacity" Value="1" />
                <Setter TargetName="PART_SortIndicator" Property="LayoutTransform" >
                    <Setter.Value>
                        <ScaleTransform ScaleX="1" ScaleY="-1"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="Opacity" TargetName="GridViewHeaderCell_Selected" Value="1" />
            </Trigger>
            <Trigger Property="SortingState" Value="None">
                <Setter TargetName="PART_SortIndicator" Property="Opacity" Value="0" />
            </Trigger>
        </ControlTemplate.Triggers>
        
    </ControlTemplate>

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

        <Setter Property="Template" Value="{StaticResource GridViewHeaderCellTemplate}" />
        
		<Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderOuterBorder}" />
		<Setter Property="BorderThickness" Value="0,0,1,1" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="5,0,3,0" />
		
		<Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground}" />
		
        <Setter Property="DropMarkPen" Value="{StaticResource GridViewHeaderCellDropMarkerPen}" />
		<Setter Property="SnapsToDevicePixels" Value="True" />
        
		
    </Style>
    
	
</ResourceDictionary>