<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
                    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
                    xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
                    xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=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:telerikTransitions="clr-namespace:Telerik.Windows.Controls.TransitionEffects;assembly=Telerik.Windows.Controls"
                    xmlns:telerikTransitonControl="clr-namespace:Telerik.Windows.Controls.TransitionControl;assembly=Telerik.Windows.Controls"
	                xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
                    xmlns:filteringEditors="clr-namespace:Telerik.Windows.Controls.Filtering.Editors;assembly=Telerik.Windows.Controls"
                    xmlns:MyTheme="clr-namespace:MyTheme">
    
<SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000" />
<SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF83A5D2" />
<SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFFFC92B" />
<SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FFFFC92B" />
<SolidColorBrush x:Key="ControlForeground_Disabled" Color="#FF8D8D8D" />
<CornerRadius x:Key="ControlOuterBorder_CornerRadius">1</CornerRadius>
<MyTheme:MyTheme x:Key="Theme" />
<SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF9BB0CD" />
<ControlTemplate x:Key="ValidationToolTipTemplate" TargetType="ToolTip">
		<Grid x:Name="Root" Margin="5,0" RenderTransformOrigin="0,0" Opacity="0">
			
			<Grid.RenderTransform>
				<TranslateTransform x:Name="xform" X="-25" />
			</Grid.RenderTransform>
			<vsm:VisualStateManager.VisualStateGroups>
				<vsm:VisualStateGroup Name="OpenStates">
					<vsm:VisualStateGroup.Transitions>
						<vsm:VisualTransition GeneratedDuration="0" />
						<vsm: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="Root"
										Storyboard.TargetProperty="Opacity" To="1"
										Duration="0:0:0.2" />
							</Storyboard>
						</vsm:VisualTransition>
					</vsm:VisualStateGroup.Transitions>
					<vsm:VisualState x:Name="Closed">
						<Storyboard>
							<DoubleAnimation Storyboard.TargetName="Root"
									Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
						</Storyboard>
					</vsm:VisualState>
					<vsm:VisualState x:Name="Open">
						<Storyboard>
							<DoubleAnimation Storyboard.TargetName="xform"
									Storyboard.TargetProperty="X" To="0" Duration="0" />
							<DoubleAnimation Storyboard.TargetName="Root"
									Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
						</Storyboard>
					</vsm:VisualState>
				</vsm:VisualStateGroup>
			</vsm:VisualStateManager.VisualStateGroups>
			

			<Border Background="#FFDC000C" CornerRadius="2">
				
				<Border.Effect>
					<DropShadowEffect Opacity="0.5" ShadowDepth="3" />
				</Border.Effect>
				
			</Border>

			<Border CornerRadius="2">
				<TextBlock Foreground="White" Margin="8,3,8,3" MaxWidth="250"
							TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" />
			</Border>
		</Grid>
		
	</ControlTemplate>

    
	<Style   TargetType="TextBox">
        <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}" />
		<Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
		<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
		<Setter Property="FontStyle" Value="Normal" />
		<Setter Property="FontWeight" Value="Normal" />
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="Padding" Value="2" />
		<Setter Property="MinHeight" Value="22" />
		
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="TextBox">
					<Grid x:Name="RootElement">
						
						<vsm:VisualStateManager.VisualStateGroups>
							<vsm:VisualStateGroup x:Name="CommonStates">
								<vsm:VisualState x:Name="Normal" />
								<vsm:VisualState x:Name="MouseOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="OuterBorder"
												Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0"
													Value="{StaticResource ControlOuterBorder_MouseOver}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="Focused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="OuterBorder"
												Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0"
													Value="{StaticResource ControlOuterBorder_Focused}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="DisabledVisual"
												Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="ContentElement"
												Storyboard.TargetProperty="Opacity">
											<DiscreteObjectKeyFrame KeyTime="0"
													Value="0.5" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="ReadOnly">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="OuterBorder"
												Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="FocusStates">
								<vsm:VisualState x:Name="Unfocused" />
							</vsm:VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="Valid" />
								<VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="ValidationErrorElement"
												Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="ValidationErrorElement"
												Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="validationTooltip"
												Storyboard.TargetProperty="IsOpen">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<sys:Boolean>True</sys:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</vsm:VisualStateManager.VisualStateGroups>
						

						<Border x:Name="OuterBorder" Background="{TemplateBinding Background}"
								BorderBrush="{TemplateBinding BorderBrush}"
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
							<ScrollViewer telerik:StyleManager.Theme="{StaticResource Theme}"
									Padding="{TemplateBinding Padding}"
									Foreground="{TemplateBinding Foreground}"
									VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
									HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
									
									
									x:Name="ContentElement"
									 />
						</Border>
							
						<Border x:Name="DisabledVisual" Visibility="Collapsed" BorderThickness="1"
								CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
								BorderBrush="{StaticResource ControlOuterBorder_Disabled}" />
						
						
						<!--Error Visual Element-->
						<Border x:Name="ValidationErrorElement" BorderThickness="1" 
								CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
								BorderBrush="#FFDB000C" Visibility="Collapsed">
							<ToolTipService.ToolTip>
								<ToolTip x:Name="validationTooltip"
										Template="{StaticResource ValidationToolTipTemplate}"
										Placement="Right"
										PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
										DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
									<ToolTip.Triggers>
										<EventTrigger RoutedEvent="Canvas.Loaded">
											<EventTrigger.Actions>
												<BeginStoryboard>
													<Storyboard>
														<ObjectAnimationUsingKeyFrames
																Storyboard.TargetName="validationTooltip"
																Storyboard.TargetProperty="IsHitTestVisible">
															<DiscreteObjectKeyFrame KeyTime="0">
																<DiscreteObjectKeyFrame.Value>
																	<sys:Boolean>true</sys:Boolean>
																</DiscreteObjectKeyFrame.Value>
															</DiscreteObjectKeyFrame>
														</ObjectAnimationUsingKeyFrames>
													</Storyboard>
												</BeginStoryboard>
											</EventTrigger.Actions>
										</EventTrigger>
									</ToolTip.Triggers>
								</ToolTip>
							</ToolTipService.ToolTip>
							<Grid Width="12" Height="12" HorizontalAlignment="Right"
									Margin="1,-4,-4,0" VerticalAlignment="Top"
									Background="Transparent">
								<Path Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"
										Fill="#FFDC000C" />
								<Path Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" />
							</Grid>
						</Border>
						

					</Grid>
					
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	
</ResourceDictionary>