<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:vsm="clr-namespace:System.Windows;assembly=System.Windows"
		xmlns:sys="clr-namespace:System;assembly=mscorlib"
		xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
                    	xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:telerikMaskedTextBox="clr-namespace:Telerik.Windows.Controls.MaskedTextBox;assembly=Telerik.Windows.Controls.Input">

	<SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000" />
<SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF898C95" />
<SolidColorBrush x:Key="TextBoxBackground" Color="#FFFFFFFF" />
<CornerRadius x:Key="ControlOuterBorder_CornerRadius">2</CornerRadius>
<SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF3C7FB1" />
<SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FFA9A9A9" />
<SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FF3C7FB1" />
<SolidColorBrush x:Key="ControlForeground_Disabled" Color="#FF6E6E6E" />

    

	<Style TargetType="telerikInput:RadMaskedTextBox"
		   
		x:Key="{telerik:ThemeResourceKey ThemeType=
		vistaCopy:VistaThemeCopyTheme , ElementType=telerikInput:RadMaskedTextBox}"
		 >
		<Setter Property="Mask" Value="aaaa"></Setter>
		<Setter Property="MaskType" Value="Standard" />
		<Setter Property="TextAlignment" Value="Left"/>
		<Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
		<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="IsReadOnly" Value="False" />
		<Setter Property="Placeholder" Value="_" />
		<Setter Property="MinHeight" Value="22" />
		<Setter Property="Background" Value="{StaticResource TextBoxBackground}" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="Padding" Value="2 0" />
		<Setter Property="IsTabStop" Value="False" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="telerikInput:RadMaskedTextBox">
					<Grid  SnapsToDevicePixels="True" >
						

						<Border BorderThickness="{TemplateBinding BorderThickness}"
								Background="{TemplateBinding Background}"
								CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
								BorderBrush="{TemplateBinding BorderBrush}" x:Name="InnerBorder">
							<Grid>
								<telerikMaskedTextBox:ExtendedTextBox x:Name="PART_ExtendedTextBox"
										TabIndex="{TemplateBinding TabIndex}" IsTabStop="True"
										Foreground="{TemplateBinding Foreground}"
										IsReadOnly="{TemplateBinding IsReadOnly}"
										TextAlignment="{TemplateBinding TextAlignment}"
										Margin="{TemplateBinding Padding}"
										HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
										VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
								<Border x:Name="EmptyContentPresenter"
										IsHitTestVisible="False" Visibility="Collapsed">
									<ContentControl x:Name="ContentElement" 
													IsTabStop="False" FontStyle="Italic" 
													Foreground="{TemplateBinding Foreground}"
													Content="{TemplateBinding EmptyContent}"
													ContentTemplate="{TemplateBinding EmptyContentTemplate}"
													HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
													VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
													Margin="{TemplateBinding Padding}" />
								</Border>

								<!--Error Visual Element-->
								<Border x:Name="ValidationErrorElement" BorderThickness="1"
										CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="#FFDB000C"
										Visibility="Collapsed">

									<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>
						</Border>
						
						<Border x:Name="FocusedVisual" Visibility="Collapsed" BorderThickness="1"
								CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
								BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
						
						<Border x:Name="DisabledVisual" Visibility="Collapsed" BorderThickness="1"
								CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
								BorderBrush="{StaticResource ControlOuterBorder_Disabled}" />
						

						
					</Grid>
					
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocusWithin" Value="True">
							<Setter TargetName="FocusedVisual" Property="Visibility"
									Value="Visible" />
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter TargetName="InnerBorder" Property="BorderBrush"
									Value="{StaticResource ControlOuterBorder_MouseOver}" />
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsKeyboardFocusWithin" Value="False" />
								<Condition Property="IsEmpty" Value="True" />
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" TargetName="EmptyContentPresenter"
									Value="Visible" />
						</MultiTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Visibility" TargetName="DisabledVisual"
									Value="Visible" />
							<Setter Property="Foreground" TargetName="ContentElement"
									Value="{StaticResource ControlForeground_Disabled}" />
							<Setter Property="Foreground" TargetName="PART_ExtendedTextBox"
									Value="{StaticResource ControlForeground_Disabled}" />
						</Trigger>
					</ControlTemplate.Triggers>
					
				</ControlTemplate>
			</Setter.Value>
		</Setter>

	</Style>
	
</ResourceDictionary>