<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:local="clr-namespace:CustomThemeBasedOnOfficeBlack_GridWpf;assembly=CustomThemeBasedOnOfficeBlack_GridWpf"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
    
    
    >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    

    <ControlTemplate x:Key="GridViewNewRowTemplate" TargetType="grid:GridViewNewRow">
        <Border x:Name="GridViewNewRowBackground" 
				Background="{TemplateBinding Background}"
				BorderBrush="{TemplateBinding BorderBrush}" 
				BorderThickness="{TemplateBinding BorderThickness}">
            <Border x:Name="FallingBackground">
                <Border Name="SelectedRow">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="Auto" />
						</Grid.ColumnDefinitions>
                        <grid:IndicatorPresenter x:Name="PART_IndicatorPresenter"  Visibility="{TemplateBinding RowIndicatorVisibility}" Grid.Column="0"
												 Background="#FFDBDEE1" 
												 BorderBrush="#FFB3B3B3" 
												 BorderThickness="1,0,1,1">
                            
                                <Path HorizontalAlignment="Center" VerticalAlignment="Center" Width="13" Height="12.761" Fill="#FF000000" Stretch="Fill" Data="M7.1814309,17.85 L20,17.85 20,19.632 4.0034657,19.632 z M3.1959208,13.714725 L3.7421504,15.971703 5.8852757,16.40302 0,19.599 2.9786448,13.932001 z M13.170675,3.7410002 L13.976983,5.6426744 15.859,6.4321728 7.0463305,15.238905 4.9116207,14.829532 4.3580957,12.551882 13.170675,3.7410002 z M16.909796,0 L19.160315,0.53160191 19.599998,2.688158 16.705103,5.5819998 14.873369,4.7454824 14.016999,2.8928623 16.909796,0 z"/>
                            
                        </grid:IndicatorPresenter>
						<grid:IndentPresenter IndentLevel="{TemplateBinding IndentLevel}" Grid.Column="1" />
                        <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter"   Grid.Column="2" 
												 MinHeight="{TemplateBinding MinHeight}"
												 Background="{TemplateBinding Background}"
												 FontSize="{TemplateBinding FontSize}"
												 FontStyle="{TemplateBinding FontStyle}"
												 FontWeight="{TemplateBinding FontWeight}"
												 Foreground="{TemplateBinding Foreground}"/>

                    </Grid>
                </Border>
                
                <Border.RenderTransform>
                    <ScaleTransform  ScaleY="1" x:Name="PART_InnerBorderTransform" />
                </Border.RenderTransform>
                
            </Border>
            
            <Border.LayoutTransform>
                <ScaleTransform  ScaleY="0" x:Name="PART_NewRowTransform" />
            </Border.LayoutTransform>
            
            
        </Border>
        
        <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Background" TargetName="SelectedRow" Value="{StaticResource GridViewRowSelectedBackground}" />
                <Setter Property="Background" TargetName="PART_IndicatorPresenter" Value="{StaticResource GridViewRowSelectedBackground}" />
                <Setter Property="BorderBrush" TargetName="SelectedRow" Value="{StaticResource GridViewRowSelectedBorderBrush}" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="False" />
                    <Condition Property="IsMouseOver" Value="True" />
                </MultiTrigger.Conditions>
                <Setter Property="Background" TargetName="SelectedRow" Value="{StaticResource GridViewRowHoveredBackground}" />
                <Setter Property="Background" TargetName="PART_IndicatorPresenter" Value="{StaticResource GridViewRowHoveredBackground}" />
                <Setter Property="BorderBrush" TargetName="SelectedRow" Value="{StaticResource GridViewRowSelectedBorderBrush}" />
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True" />
                    <Condition Property="IsCurrent" Value="False" />
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" TargetName="SelectedRow" Value="{StaticResource GridViewRowSelectedBorderBrush}" />
            </MultiTrigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter Property="BorderBrush" TargetName="SelectedRow">
                    <Setter.Value>
                        <DrawingBrush TileMode="Tile" Viewport="0, 0, 2, 2" ViewportUnits="Absolute">
                            <DrawingBrush.Drawing>
                                <GeometryDrawing Brush="{StaticResource GridViewNewRowCurrentBorderBrush}" Geometry="M0,0L0,1 1,1 1,0z M1,1L2,1 2,2 1,2z" />
                            </DrawingBrush.Drawing>
                        </DrawingBrush>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Visibility" Value="Visible">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource GridViewNewRowAppear}"/>
                </Trigger.EnterActions>
            </Trigger>

        </ControlTemplate.Triggers>
        
    </ControlTemplate>

    <Style 
        
        x:Key="{telerik:ThemeResourceKey ThemeType=local:CustomTheme, ElementType=grid:GridViewNewRow}"
         
        TargetType="grid:GridViewNewRow">
        
        <Setter Property="Template" Value="{StaticResource GridViewNewRowTemplate}" />
		<!-- Sets the height of the row: Default is 24 -->
		<Setter Property="MinHeight" Value="24" />
		<Setter Property="Background" Value="{StaticResource GridViewRowNormalBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource GridViewIndicatorBorderBrush}" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="FontSize" Value="11" />
		<Setter Property="FontStyle" Value="Normal" />
		<Setter Property="FontWeight" Value="Normal" />
		<Setter Property="Foreground" Value="Red" />
    </Style>
    
</ResourceDictionary>