<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:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:treelist="clr-namespace:Telerik.Windows.Controls.TreeListView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
				
				
			
					>
    
	<SolidColorBrush x:Key="GridViewHeaderCellDropMarkerPenBrush" Color="White" />
<SolidColorBrush x:Key="GridView_HeaderInnerBorder" Color="#FFEFF6FF" />
<SolidColorBrush x:Key="GridView_HeaderOuterBorder_Over" Color="#FFFFC92B" />
<SolidColorBrush x:Key="GridView_HeaderInnerBorder_Over" Color="White" />
<LinearGradientBrush x:Key="GridView_HeaderBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFFFBA3" Offset="1"/>
		<GradientStop Color="#FFFFFBDA" Offset="0"/>
		<GradientStop Color="#FFFFD25A" Offset="0.43"/>
		<GradientStop Color="#FFFEEBAE" Offset="0.42"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_HeaderOuterBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FF616161" Offset="0"/>
		<GradientStop Color="#FF989898" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_HeaderInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFB69A78"/>
		<GradientStop Color="#FFFFE17A" Offset="0.126"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_HeaderBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFFD74E" Offset="0.996"/>
		<GradientStop Color="#FFFFDCAB" Offset="0.17"/>
		<GradientStop Color="#FFFFB062" Offset="0.57"/>
		<GradientStop Color="#FFFFD18F" Offset="0.56"/>
		<GradientStop Color="#FFFFBA74"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="GridView_SortIndicatorColor" Color="#FF3C6AA3" />
<telerik:Office_BlueTheme 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,1" StartPoint="0.5,0">
		<GradientStop Color="#FFEBF3FF" Offset="0"/>
		<GradientStop Color="#FFD0E8FF" Offset="1"/>
		<GradientStop Color="#FFABC9EE" Offset="0.43"/>
		<GradientStop Color="#FFC6DFFF" Offset="0.42"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="GridView_HeaderOuterBorder" Color="#FF83A5D2" />
<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>

    <Style TargetType="ContentControl" x:Key="StretchedContentControl">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    </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}"
			                Style="{StaticResource StretchedContentControl}"
							Margin="{TemplateBinding Padding}" IsTabStop="{TemplateBinding IsTabStop}"
                            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" IsTabStop="{TemplateBinding IsTabStop}" Style="{StaticResource ColumnHeaderGripperStyle}" Grid.ColumnSpan="2" />
            <Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" IsTabStop="{TemplateBinding IsTabStop}" 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=telerik:Office_BlueTheme, 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>