<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:input="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
					
				
					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="ControlOuterBorder_Invalid" Color="#FFDC000C" />
<SolidColorBrush x:Key="ControlInnerBorder_Invalid" Color="White" />
<LinearGradientBrush x:Key="Control_InvalidToolTipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFF424C" Offset="1"/>
		<GradientStop Color="#FFC92931"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="ControlForeground_Invalid" Color="White" />

	

<telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

<ControlTemplate x:Key="ValidationToolTipTemplate" TargetType="ToolTip">
	<Grid x:Name="Root" Margin="4,0,0,0" Opacity="1">
		<Border BorderBrush="{StaticResource ControlOuterBorder_Invalid}" BorderThickness="1" CornerRadius="1">
			<Border BorderBrush="{StaticResource ControlInnerBorder_Invalid}" BorderThickness="1" Background="{StaticResource Control_InvalidToolTipBackground}">
				<TextBlock VerticalAlignment="Center" Margin="4" MaxWidth="250"
						   Text="{TemplateBinding Content}"
						   Foreground="{StaticResource ControlForeground_Invalid}" TextWrapping="Wrap"/>
			</Border>
		</Border>
	</Grid>
</ControlTemplate>
	
<ControlTemplate x:Key="GridViewEditorPresenterTemplate" TargetType="grid:GridViewEditorPresenter">
    <Grid>
        <ContentPresenter Margin="1,1,1,2" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
		<Border x:Name="ValidationErrorElement" Visibility="Collapsed" CornerRadius="1" BorderBrush="{StaticResource ControlOuterBorder_Invalid}" BorderThickness="1" Margin="1,1,1,2">
            <ToolTipService.ToolTip>
                <ToolTip x:Name="validationTooltip" Placement="Right" 
                         Content="{TemplateBinding ErrorMessage}" 
                         Template="{StaticResource ValidationToolTipTemplate}">
                </ToolTip>
            </ToolTipService.ToolTip>
            <Grid Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12" Background="Transparent">
				<Path Fill="{StaticResource ControlOuterBorder_Invalid}" Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
				<Path Fill="{StaticResource ControlInnerBorder_Invalid}" Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
			</Grid>
		</Border>
		
    </Grid>
    
    <ControlTemplate.Triggers>
        <Trigger Property="IsContentValid" Value="False">
            <Setter TargetName="ValidationErrorElement" Property="Visibility" Value="Visible" />
        </Trigger>
    </ControlTemplate.Triggers>
    
</ControlTemplate>

<Style 
    
    x:Key="{telerik:ThemeResourceKey ThemeType=
    vistaCopy:VistaThemeCopyTheme , ElementType=grid:GridViewEditorPresenter}"
    
    TargetType="grid:GridViewEditorPresenter">
		<Setter Property="Template" Value="{StaticResource GridViewEditorPresenterTemplate}" />
		<Setter Property="VerticalAlignment" Value="Stretch" />
		<Setter Property="HorizontalAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="Padding" Value="1,1,1,2" />
	</Style>

	
</ResourceDictionary>