	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="clr-namespace:C1.WPF">
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
	</ResourceDictionary.MergedDictionaries>

	<!--******************** TextBoxBase ********************-->
	<Style TargetType="c1:C1TextBoxBase">
        
        
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="FocusBrush" Value="{StaticResource WpfInputFocusBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="SelectionBackground" Value="{StaticResource WpfInputSelectedForegroundBrush}" />
        <Setter Property="SelectionForeground" Value="{StaticResource WpfInputSelectedForegroundBrush}" />		
		<Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
		<Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
		<Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="CornerRadius" Value="{StaticResource GeneralCornerRadius}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />	
		<Setter Property="Padding" Value="2" />
		<Setter Property="Cursor" Value="IBeam" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1:C1TextBoxBase">
					<Grid x:Name="RootElement">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="ReadOnly">
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusedVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusedVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="WatermarkStates">
								<VisualState x:Name="Watermarked">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Watermark" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
                                        
                                        
                                        <DoubleAnimation Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0" />
                                    </Storyboard>
								</VisualState>
								<VisualState x:Name="Unwatermarked">
									<Storyboard>
                                        
                                        
                                        <DoubleAnimation Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0" />
                                    </Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="Valid" />
								<VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationDecorator" Storyboard.TargetProperty="ValidationState">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<c1:ValidationState>InvalidUnfocused</c1:ValidationState>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationDecorator" Storyboard.TargetProperty="ValidationState">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<c1:ValidationState>InvalidFocused</c1:ValidationState>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" />
						<Grid Margin="{TemplateBinding BorderThickness}">
                            
                            <!-- WPF version of the "content element" -->
                            
                            <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Foreground="{TemplateBinding Foreground}" BorderThickness="0" Padding="{TemplateBinding Padding}" />
                            <ContentControl x:Name="Watermark" IsTabStop="False" IsHitTestVisible="False" Content="{TemplateBinding Watermark}" Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Opacity="0.65" Visibility="Collapsed" />
						</Grid>
						<Border x:Name="FocusedVisualElement" Visibility="{TemplateBinding FocusCuesVisibility}" BorderBrush="{TemplateBinding FocusBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0" />
						<Border x:Name="MouseOverElement" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding MouseOverBrush}" CornerRadius="{TemplateBinding CornerRadius}" Cursor="{TemplateBinding Cursor}" Visibility="Collapsed" />		
						<Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{TemplateBinding CornerRadius}" IsHitTestVisible="False" Opacity="0" Visibility="{TemplateBinding DisabledCuesVisibility}" />
						<c1:C1ValidationDecorator x:Name="ValidationDecorator" Target="{Binding RelativeSource={RelativeSource TemplatedParent}}" Style="{TemplateBinding ValidationDecoratorStyle}" CornerRadius="{TemplateBinding CornerRadius}" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>