<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:CustomTheme;assembly=CustomTheme"
        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"
    
     >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml"/>
    </ResourceDictionary.MergedDictionaries>


    <ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <Border x:Name="SelectionBackground" Grid.Column="2"
					Background="{TemplateBinding Background}"
					MinHeight="{TemplateBinding MinHeight}" 
					BorderBrush="{TemplateBinding BorderBrush}" 
					BorderThickness="{TemplateBinding BorderThickness}"
					Margin="{TemplateBinding Margin}"
					Padding="{TemplateBinding Padding}" />

            <Rectangle x:Name="BackgroundRectangle" Grid.Column="2" Opacity="0" 
					   Fill="{StaticResource GrdViewRowInnerBorderBackground_Selected}" 
					   Stroke="{StaticResource GrdViewRowOuterBorderBrush_Over}"
					   StrokeThickness="1" />

            <grid:IndicatorPresenter x:Name="PART_IndicatorPresenter"  Visibility="{TemplateBinding RowIndicatorVisibility}" Grid.Column="0"
									 Background="{TemplateBinding Background}"
									 BorderBrush="{StaticResource GridViewHeaderCellBorderBrush}" 
									 BorderThickness="1,0,1,1">

                <Path x:Name="NavigatorIndicator" 
								  Fill="#FF000000" Stretch="Fill" Width="5" Height="8" Data="M254.5,183.75 L254.5,193.33333 260.75,188.16682 z"
								  Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center" />

            </grid:IndicatorPresenter>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"  IndentLevel="{TemplateBinding IndentLevel}" Grid.Column="1" Background="{TemplateBinding Background}" />
            <grid:DataCellsPresenter  Height="Auto" x:Name="PART_DataCellsPresenter" Grid.Column="2"
												 MinHeight="{TemplateBinding MinHeight}" />

            <Rectangle Width="Auto" Height="Auto" x:Name="InvalidBorder" Margin="0" Visibility="Collapsed" Stroke="Red" StrokeThickness="2"
					   Grid.Column="0" Grid.ColumnSpan="3" />



        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Opacity" TargetName="BackgroundRectangle" Value="1"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="False" />
                    <Condition Property="IsMouseOver" Value="True" />
                </MultiTrigger.Conditions>
                <Setter Property="Opacity" TargetName="BackgroundRectangle" Value=".5"/>
            </MultiTrigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsContentValid" Value="False">
                <Setter TargetName="InvalidBorder" Property="Visibility" Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>

    </ControlTemplate>


    <Style 
        
        x:Key="{telerik:ThemeResourceKey ThemeType=local:MyCustomTheme, ElementType=grid:GridViewRow}"
         
        TargetType="grid:GridViewRow">

        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template" Value="{StaticResource GridViewRowTemplate}" />

        <Setter Property="Background" Value="{StaticResource GridViewRowBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource GridViewRowBorderBrush}" />
        <Setter Property="BorderThickness" Value="0,0,0,0" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="MinHeight" Value="24" />
        <Setter Property="FontSize" Value="11" />
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Foreground" Value="#FF000000" />


        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=IsAlternating, RelativeSource={RelativeSource Self}}" Value="true"/>
                    <Condition Binding="{Binding Path=UseAlternateRowStyle, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type controls:RadGridView}}}" Value="true"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Background" Value="{StaticResource GridViewRowInnerBorderBackground_Alternate}" />
            </MultiDataTrigger>
        </Style.Triggers>


    </Style>

</ResourceDictionary>