<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls"
		xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
		xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
		xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d">
	<telerik:Expression_DarkTheme x:Key="Theme" />

	<SolidColorBrush x:Key="ValidationTooltipBorder" Color="#FF9A0000" />

	<LinearGradientBrush x:Key="ValidationTooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFF424C" Offset="1"/>
		<GradientStop Color="#FFC92931"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="ValidationTooltipForeground" Color="#FFDDDDDD" />

    <ControlTemplate x:Key="ErrorTooltipTemplate" TargetType="ToolTip">
        <Grid x:Name="RootVisual" Margin="5 0" RenderTransformOrigin="0 0" Opacity="0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0" />
                        <VisualTransition To="Open" GeneratedDuration="0:0:0.2">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".3" EasingMode="EaseOut" />
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2" />
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0" />
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25" />
            </Grid.RenderTransform>
            <ContentPresenter />
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="ValidationTooltipTemplate" TargetType="telerikChromes:ValidationTooltip">
        <Grid x:Name="VisualRoot">
            <ToolTipService.ToolTip>
                <!--   IsOpen="{TemplateBinding IsOpen}" -->
                <ToolTip x:Name="PART_ToolTip" Template="{StaticResource ErrorTooltipTemplate}" Placement="Right" PlacementTarget="{TemplateBinding TooltipPlacementTarget}">
                    <ToolTip.Triggers>
                        <EventTrigger RoutedEvent="Canvas.Loaded">
                        	<BeginStoryboard>
                        		<Storyboard>
                        			<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ToolTip" Storyboard.TargetProperty="IsHitTestVisible">
                        				<DiscreteObjectKeyFrame KeyTime="0">
                        					<DiscreteObjectKeyFrame.Value>
                        						<sys:Boolean>true</sys:Boolean>
                        					</DiscreteObjectKeyFrame.Value>
                        				</DiscreteObjectKeyFrame>
                        			</ObjectAnimationUsingKeyFrames>
                        		</Storyboard>
                        	</BeginStoryboard>
                        </EventTrigger>
                    </ToolTip.Triggers>
                    <Border Background="{StaticResource ValidationTooltipBackground}" BorderBrush="{StaticResource ValidationTooltipBorder}" BorderThickness="1" CornerRadius="3" Padding="1">
						<ContentPresenter Content="{TemplateBinding TooltipContent}" ContentTemplate="{TemplateBinding TooltipContentTemplate}" />
                    </Border>
                </ToolTip>
            </ToolTipService.ToolTip>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" IsHitTestVisible="False" />
            <Path Data="M0,1 L6,1 6,7 Z" Fill="{StaticResource ValidationTooltipBorder}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top" />
            <Path x:Name="InvisibleHitArea" Data="M0,0 9,0 9,9 8,9 0,1 Z" Fill="Blue" Opacity="0" Margin="-1" Width="9" Height="9" HorizontalAlignment="Right" VerticalAlignment="Top" />
        </Grid>
    </ControlTemplate>

    <DataTemplate x:Key="TooltipContentTemplate">
        <TextBlock Padding="4 1" Foreground="{StaticResource ValidationTooltipForeground}" MaxWidth="250" TextWrapping="Wrap" Text="{Binding [0].ErrorContent}" />
    </DataTemplate>
    
    <!-- ValidationTooltip -->
	<Style TargetType="telerikChromes:ValidationTooltip">
		<Setter Property="IsTabStop" Value="False" />
		<Setter Property="CornerRadius" Value="2.5" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="BorderBrush" Value="{StaticResource ValidationTooltipBorder}" />
        <Setter Property="Template" Value="{StaticResource ValidationTooltipTemplate}" />
        <Setter Property="TooltipContentTemplate" Value="{StaticResource TooltipContentTemplate}" />
	</Style>
    
    

</ResourceDictionary>