<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">

	<telerik:Expression_DarkTheme x:Key="Theme" />

	<SolidColorBrush x:Key="TextBoxBackground_Normal" Color="#FF333333" />
	<SolidColorBrush x:Key="TextBoxBackground_Disabled" Color="#FF5D5C5C" />
	<SolidColorBrush x:Key="TextBoxSelectionBackground" Color="#FF2D6891" />
	<SolidColorBrush x:Key="TextBoxBorder_Disabled" Color="#FF5D5C5C" />
	
	<LinearGradientBrush x:Key="TextBoxBorder_Normal" EndPoint="1,0.5" StartPoint="0,0.5">
		<GradientStop Color="#FF707070" Offset="0"/>
		<GradientStop Color="#FF707070" Offset="1"/>
		<GradientStop Color="#FFA3A3A3" Offset="0.5"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="TextBoxBorder_MouseOver" EndPoint="1,0.5" StartPoint="0,0.5">
		<GradientStop Color="#FFB0B0B0" Offset="0"/>
		<GradientStop Color="#FFB0B0B0" Offset="1"/>
		<GradientStop Color="#FFE0E1E2" Offset="0.5"/>
	</LinearGradientBrush>
	
	<SolidColorBrush x:Key="TextBoxWatermarkForeground" Color="#FF868686" />
	<SolidColorBrush x:Key="ButtonBorder_Focus" Color="#FF789FC3"/>

	<ControlTemplate x:Key="WatermarkTextBoxControlTemplate" TargetType="telerik:RadWatermarkTextBox">
		<Grid x:Name="RootElement">
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="Normal" />
					<VisualState x:Name="MouseOver">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Disabled">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="(UIElement.Visibility)">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="BorderBrush">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBorder_Disabled}" />
							</ObjectAnimationUsingKeyFrames>
							<DoubleAnimation Duration="0" To="0.27" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" />
							<DoubleAnimation Duration="0" To="0.27" Storyboard.TargetName="WatermarkVisualElement" Storyboard.TargetProperty="Opacity" />
						</Storyboard>
					</VisualState>
					<VisualState x:Name="ReadOnly" />
				</VisualStateGroup>
				<VisualStateGroup x:Name="FocusStates">
					<VisualState x:Name="Focused">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Focus">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Unfocused"/>
				</VisualStateGroup>
				<VisualStateGroup x:Name="WatermarkStates">
					<VisualState x:Name="WatermarkHidden" />
					<VisualState x:Name="WatermarkVisible">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="WatermarkVisualElement" Storyboard.TargetProperty="Visibility">
								<DiscreteObjectKeyFrame KeyTime="0:0:0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
				<VisualStateGroup x:Name="ValidationStates">
					<VisualState x:Name="Valid"/>
					<VisualState x:Name="InvalidUnfocused">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="Visibility">
								<DiscreteObjectKeyFrame KeyTime="0:0:0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="InvalidFocused">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="Visibility">
								<DiscreteObjectKeyFrame KeyTime="0:0:0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="IsOpen">
								<DiscreteObjectKeyFrame KeyTime="0:0:0">
									<DiscreteObjectKeyFrame.Value>
										<sys:Boolean>True</sys:Boolean>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			
			<Border x:Name="Background" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
			<Border x:Name="MouseOverVisual" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" BorderBrush="{StaticResource TextBoxBorder_MouseOver}" />
			
			<ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}" />
			
			<ContentControl x:Name="WatermarkVisualElement" Foreground="{StaticResource TextBoxWatermarkForeground}" Visibility="Collapsed" Content="{TemplateBinding WatermarkContent}" ContentTemplate="{TemplateBinding WatermarkTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Padding="{TemplateBinding Padding}" />
			<Border x:Name="Focus" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ButtonBorder_Focus}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" />
			
			<telerikChromes:ValidationTooltip x:Name="ValidationTooltip" Grid.ColumnSpan="2" Visibility="Collapsed" telerik:StyleManager.Theme="{StaticResource Theme}" TooltipPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" TooltipContent="{Binding (Validation.Errors), RelativeSource={RelativeSource TemplatedParent}}" />
		</Grid>
	</ControlTemplate>
				
	<Style x:Key="WatermarkTextBoxStyle" TargetType="telerik:RadWatermarkTextBox">
		<Setter Property="Padding" Value="5 3" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="AllowDrop" Value="True" />
		<Setter Property="IsTabStop" Value="True" />
		<Setter Property="Foreground" Value="White" />
		<Setter Property="SelectionBackground" Value="{StaticResource TextBoxSelectionBackground}" />
		<Setter Property="Background" Value="{StaticResource TextBoxBackground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder_Normal}" />
        <Setter Property="BorderThickness" Value="1" />
		<Setter Property="TabNavigation" Value="Once" />
		<Setter Property="Template" Value="{StaticResource WatermarkTextBoxControlTemplate}" />
	</Style>

	<!--telerik:RadDateTimePicker-->
	<Style TargetType="telerik:RadWatermarkTextBox" BasedOn="{StaticResource WatermarkTextBoxStyle}"  />

	 
</ResourceDictionary>