<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="GridView_IndicatorPrimaryColor" Color="#FF1768BA" />
<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_Over" Color="#FF3C7FB1" />
<SolidColorBrush x:Key="ControlBackground" Color="White" />
<SolidColorBrush x:Key="ControlOuterBorder" Color="#FF83A5D2" />
<LinearGradientBrush x:Key="GridView_HeaderInnerBorder" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFCFCFC" Offset="0"/>
		<GradientStop Color="#FFE8F5FC" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="GridView_SortIndicatorColor_Sorted" EndPoint="0.945,0.101" StartPoint="0.055,0.899">
		<GradientStop Color="#FF0F549A" Offset="0.417"/>
		<GradientStop Color="#FF1768BA" Offset="0.634"/>
	</LinearGradientBrush>
<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" />

	

    <ControlTemplate x:Key="CloseButtonTemplate" TargetType="Button">
        <Border x:Name="CloseButton" 
				BorderBrush="{TemplateBinding BorderBrush}" 
				BorderThickness="{TemplateBinding BorderThickness}" 
				CornerRadius="1"
				Width="11" Height="11"
				Background="{TemplateBinding Background}" >

            

            <Path Fill="{StaticResource GridView_IndicatorPrimaryColor}"
				  Margin="{TemplateBinding Padding}"
				  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
				  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
				  Width="5" Height="5" 
				  Data="M4,4L5,4 5,5 4,5z M0,4L1,4 1,5 0,5z M3,3L4,3 4,4 3,4z M1,3L2,3 2,4 1,4z M2,2L3,2 3,3 2,3z M4,0L5,0 5,1 4,1 4,2 3,2 3,0.99999994 4,0.99999994z M0,0L1,0 1,0.99999994 2,0.99999994 2,2 1,2 1,1 0,1z"/>
        </Border>

        
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="CloseButton" Property="Background" Value="{StaticResource GridView_HeaderBackground_Over}" />
                <Setter TargetName="CloseButton" Property="BorderBrush" Value="{StaticResource GridView_HeaderOuterBorder_Over}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True"/>
            <Trigger Property="IsDefaulted" Value="True"/>
            <Trigger Property="IsPressed" Value="True"/>
            <Trigger Property="IsEnabled" Value="False"/>
        </ControlTemplate.Triggers>
        
    </ControlTemplate>

    <Style x:Key="ButtonCloseStyle" TargetType="Button">
        <Setter Property="Template" Value="{StaticResource CloseButtonTemplate}" />
        <Setter Property="Background" Value="{StaticResource ControlBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
    </Style>

    <Storyboard x:Key="MouseOver">
        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PART_CloseButton" Storyboard.TargetProperty="Opacity">
            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="-7"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    <Storyboard x:Key="MouseOut">
        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PART_CloseButton" Storyboard.TargetProperty="Opacity">
            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <ControlTemplate x:Key="GridViewGroupPanelCellTemplate" TargetType="grid:GridViewGroupPanelCell">
        <Grid>

            

            <Border x:Name="OuterBorder" CornerRadius="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Border x:Name="InnerBorder" BorderBrush="{StaticResource GridView_HeaderInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                    <Grid>
                        <Path x:Name="PART_SortIndicator"
                          Fill="{StaticResource GridView_SortIndicatorColor_Sorted}" 
                          Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Top"
						  Margin="0,1,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"
						  Visibility="Collapsed" />
                        <ContentControl x:Name="ContentElement" Content="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}">
                            <ContentControl.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </ContentControl.RenderTransform>
                        </ContentControl>
                        <Button x:Name="PART_CloseButton" Style="{StaticResource ButtonCloseStyle}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="4,0" Opacity="0" />
                    </Grid>
                </Border>
            </Border>

        </Grid>
        
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource MouseOver}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource MouseOut}" />
                </Trigger.ExitActions>
            </Trigger>
            <DataTrigger Binding="{Binding Path=SortDirection}" Value="Ascending">
                <Setter Property="Visibility" TargetName="PART_SortIndicator" Value="Visible" />
                <Setter Property="LayoutTransform" TargetName="PART_SortIndicator">
                    <Setter.Value>
                        <ScaleTransform ScaleX="1" ScaleY="-1" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=SortDirection}" Value="Descending">
                <Setter Property="Visibility" TargetName="PART_SortIndicator" Value="Visible" />
                <Setter Property="LayoutTransform" TargetName="PART_SortIndicator">
                    <Setter.Value>
                        <ScaleTransform ScaleX="1" ScaleY="1" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=SortDirection}" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="PART_SortIndicator" Value="Collapsed" />
            </DataTrigger>
        </ControlTemplate.Triggers>
        
    </ControlTemplate>

    <Style 
        
        x:Key="{telerik:ThemeResourceKey ThemeType=
        vistaCopy:VistaThemeCopyTheme , ElementType=grid:GridViewGroupPanelCell}"
        
        TargetType="grid:GridViewGroupPanelCell">
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelCellTemplate}" />
        <Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderOuterBorder}" />
        <Setter Property="Padding" Value="20,0" />
        <Setter Property="MinHeight" Value="24" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground}" />
        
        <Setter Property="SnapsToDevicePixels" Value="True" />
        
    </Style>
    
	
</ResourceDictionary>