<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:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:treelist="clr-namespace:Telerik.Windows.Controls.TreeListView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
				
				
			
	>

	<SolidColorBrush x:Key="ControlOuterBorder_Invalid" Color="#FFDB000C" />
<SolidColorBrush x:Key="ControlInnerBorder_Invalid" Color="White" />

	

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

	<ControlTemplate x:Key="ValidationToolTipTemplate" TargetType="ToolTip">
		<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
			
			
			<Grid.RenderTransform>
				<TranslateTransform x:Name="xform" X="-25"/>
			</Grid.RenderTransform>
			
			<Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5"/>
			<Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4"/>
			<Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3"/>
			<Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2"/>
			<Border Background="#FFDC000C" CornerRadius="2"/>
			<Border CornerRadius="2">
				
				
				<TextBlock Margin="8,4,8,4" MaxWidth="250" Foreground="White" Text="{TemplateBinding Content}" TextWrapping="Wrap"/>
				<!--<TextBlock Foreground="White" Margin="8,3,8,3" MaxWidth="250" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" />-->
				
			</Border>
		</Grid>
		
		
		<ControlTemplate.Triggers>
			<Trigger Property="IsOpen" Value="True">
				<Trigger.EnterActions>
					<BeginStoryboard x:Name="OpenAnimation">
						<Storyboard>
							<DoubleAnimation Storyboard.TargetName="xform"
									Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2" />
							<DoubleAnimation Storyboard.TargetName="Root"
									Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2" />
						</Storyboard>
					</BeginStoryboard>
				</Trigger.EnterActions>
				<Trigger.ExitActions>
					<StopStoryboard BeginStoryboardName="OpenAnimation" />
				</Trigger.ExitActions>
			</Trigger>
			<Trigger Property="IsOpen" Value="True">
				<Setter TargetName="Root" Property="RenderTransform">
					<Setter.Value>
						<TranslateTransform X="0" />
					</Setter.Value>
				</Setter>
				<Setter Property="Opacity" Value="1" TargetName="Root" />
			</Trigger>
			<Trigger Property="IsOpen" Value="False">
				<Setter Property="Opacity" Value="0" TargetName="Root" />
			</Trigger>
		</ControlTemplate.Triggers>
		
		
	</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=
    telerik:VistaTheme , 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>