<UserControl
	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"
	x:Class="SilverlightApplication48.MainPage"
	Width="640" Height="480">
	<UserControl.Resources>
		<SolidColorBrush x:Key="GridView_HeaderRowInnerBorder" Color="#FF4B4B4B"/>
		<telerik:Office_BlackTheme x:Key="Theme"/>
		<SolidColorBrush x:Key="GridView_HeaderInnerBorder" Color="#FF4B4B4B"/>
		<LinearGradientBrush x:Key="GridView_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF5B5B5B" Offset="1"/>
			<GradientStop Color="#FF868686"/>
			<GradientStop Color="#FF4F4F4F" Offset="0.42"/>
			<GradientStop Color="#FF0E0E0E" Offset="0.43"/>
		</LinearGradientBrush>
		<DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
			<telerik:GridViewHeaderIndentCell telerik:StyleManager.Theme="{StaticResource Theme}"/>
		</DataTemplate>
		<telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
		<ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="telerik:GridViewHeaderRow">
			<telerik:SelectiveScrollingGrid>
				<telerik:SelectiveScrollingGrid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="*"/>
				</telerik:SelectiveScrollingGrid.ColumnDefinitions>
				<Border x:Name="PART_GridViewHeaderRowBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="4" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
					<Border BorderBrush="{StaticResource GridView_HeaderRowInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}"/>
				</Border>
				<telerik:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
				<Border x:Name="PART_IndicatorPresenter" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{TemplateBinding RowIndicatorVisibility}" Width="25">
					<Border BorderBrush="#FF0BE422" BorderThickness="1" Background="#FFE9E106"/>
				</Border>
				<telerik:IndentPresenter x:Name="PART_IndentPresenter" Grid.Column="1" ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}" IndentLevel="{TemplateBinding IndentLevel}" MinHeight="{TemplateBinding MinHeight}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" telerik:StyleManager.Theme="{StaticResource Theme}"/>
				<Border x:Name="PART_HierarchyIndentPresenter" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Grid.Column="2" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HasHierarchy, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" Width="25">
					<Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" BorderThickness="1" Background="{StaticResource GridView_HeaderBackground}"/>
				</Border>
			</telerik:SelectiveScrollingGrid>
		</ControlTemplate>
		<LinearGradientBrush x:Key="GridView_HeaderRowBackground" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF5B5B5B" Offset="1"/>
			<GradientStop Color="#FF868686"/>
			<GradientStop Color="#FF4F4F4F" Offset="0.42"/>
			<GradientStop Color="#FF0E0E0E" Offset="0.43"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="GridView_HeaderRowOuterBorder" Color="#FF848484"/>
		<Style x:Key="GridViewHeaderRowStyle1" TargetType="telerik:GridViewHeaderRow">
			<Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}"/>
			<Setter Property="Background" Value="{StaticResource GridView_HeaderRowBackground}"/>
			<Setter Property="MinHeight" Value="27"/>
			<Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderRowOuterBorder}"/>
			<Setter Property="BorderThickness" Value="1,0,0,1"/>
			<Setter Property="VerticalContentAlignment" Value="Stretch"/>
			<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
			<Setter Property="Padding" Value="0"/>
		</Style>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}">
		<telerik:RadGridView CanUserFreezeColumns="False" Margin="64,64,96,96" ItemsSource="{Binding Collection}" HeaderRowStyle="{StaticResource GridViewHeaderRowStyle1}"/>
	</Grid>
</UserControl>