<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"
    
    
    >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <ControlTemplate x:Key="GridViewCellTemplate" TargetType="grid:GridViewCell">
        <Grid Background="{TemplateBinding Background}">
            <Border x:Name="GridViewCellBorder" SnapsToDevicePixels="True"
					BorderThickness="{TemplateBinding BorderThickness}" 
					BorderBrush="{TemplateBinding BorderBrush}" />

            <grid:AlignmentContentPresenter x:Name="PART_ContentPresenter" Margin="{TemplateBinding Padding}" Visibility="Visible"
				    Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
				    VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
				    TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}"
					
				    
					TextTrimming="{TemplateBinding TextTrimming}" ClipToBounds="True"
					 />

            <ContentPresenter x:Name="PART_EditorPresenter" Visibility="Collapsed"
							  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							  HorizontalAlignment="Stretch"
							  Margin="{TemplateBinding Padding}"
							  ClipToBounds="True" />




            <Rectangle Width="Auto" Height="Auto" x:Name="InvalidBorder" Margin="0" Visibility="Collapsed" Stroke="Red" StrokeThickness="2" />
            <Grid x:Name="ErrorIcon" Visibility="Collapsed" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="2,0,2,0" Width="18" Height="18">

                <Ellipse Fill="#FF535353" />
                <Ellipse Fill="#FFCE3527" Stroke="#FFFFFFFF" Margin="1,1,1,1"/>
                <Path Stretch="Fill" Margin="0.999,1,1.001,8.134" Data="M16,8 C8.127,4.9999293 6.627,10.999763 0,8 0,3.581722 3.581722,0 8,0 12.418278,0 16,3.581722 16,8 z">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#99FFFFFF" Offset="0"/>
                            <GradientStop Color="#33FFFFFF" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path  Stretch="Fill" Stroke="#FF000000" Margin="5.168,5.748,4.832,4.252" Data="M0.50001547,0.5 L6.5000797,6.5000169 M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="2"/>
                <Path Fill="#FFCE3527" Stretch="Fill" Stroke="#FFFFFFFF" Margin="5.085,5.084,4.915,4.916" Data="M0.50001547,0.5 L6.5000797,6.5000169 M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="2"/>
            </Grid>


        </Grid>

        <ControlTemplate.Triggers>
            <!--<Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="GridViewCellBorder" Property="Background" Value="{StaticResource GridViewRowHoveredBackground}" />
            </Trigger>-->
            <!--<Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="GridViewCellBorder" Property="Background" Value="{StaticResource GridViewRowSelectedBackground}" />
            </Trigger>-->
            <Trigger Value="True" Property="IsInEditMode">
                <Setter Property="Visibility" TargetName="PART_EditorPresenter" Value="Visible"/>
                <Setter Property="Visibility" TargetName="PART_ContentPresenter" Value="Collapsed"/>
                <Setter Property="Background" TargetName="GridViewCellBorder" Value="{StaticResource GridViewCellEditBorderBackground}" />
                <Setter Property="BorderThickness" TargetName="GridViewCellBorder" Value="2" />
                <Setter Property="BorderBrush" TargetName="GridViewCellBorder" Value="{StaticResource GridViewCellEditBorderBrush}" />
            </Trigger>
            <Trigger Property="IsContentValid" Value="False">
                <Setter TargetName="InvalidBorder" Property="Visibility" Value="Visible" />
                <Setter TargetName="ErrorIcon" Property="Visibility" Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>

    </ControlTemplate>

    <Style 
        
        x:Key="{telerik:ThemeResourceKey ThemeType=local:MyCustomTheme, ElementType=grid:GridViewCell}"
        
        TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/>
        <Setter Property="Padding" Value="3,0,3,0"/>
        <Setter Property="BorderThickness" Value="0,0,0,0"/>
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Foreground" Value="#FF000000" />
    </Style>

    
</ResourceDictionary>
