	  
	   
    
		

<!--// Copyright © ComponentOne LLC.
// This file is part of the ComponentOne Studio for Silverlight
// Please visit www.componentone.com for details
// All other rights reserved.
-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.4" xmlns:ms_silverlightonly="http://schemas.microsoft.com/client/2007" xmlns:extended="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit" xmlns:primitives_silverlightonly="clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit" xmlns:c1datetime="clr-namespace:C1.WPF.DateTimeEditors" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="ms_silverlightonly">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
        <ResourceDictionary Source="/C1.WPF.4;component/themes/C1Button.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--******************  DatePicker ********************-->

    <!-- Style @ DatePickerTemplate Item Separator -->
    <Style x:Key="DatePickerItemSeparator" TargetType="Rectangle">
        <Setter Property="Width" Value="1" />
    </Style>
    <!-- Thickness @ DatePickerTemplate Button -->
    <Thickness x:Key="DatePickerButtonBorderThickness">0</Thickness>
    <!-- Margin @ DatePickerTemplate Button -->
    <Thickness x:Key="DatePickerButtonMargin">0</Thickness>

    <!--******************* C1DatePicker ********************-->
    <ControlTemplate x:Key="C1DatePickerTemplate" TargetType="c1datetime:C1DatePicker">
        <Grid x:Name="Root">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused" />
                    <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>
                </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}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Rectangle Fill="{TemplateBinding BorderBrush}" Grid.Column="1" Style="{StaticResource DatePickerItemSeparator}" />
                <Button x:Name="Button" Grid.Column="2" Style="{StaticResource ClearStyleButtonStyle}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter='topright bottomright'}" Background="{TemplateBinding ButtonBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{StaticResource DatePickerButtonBorderThickness}" Margin="{StaticResource DatePickerButtonMargin}" IsEnabled="{TemplateBinding IsEnabled}" IsTabStop="False" Padding="0">
                    <Polygon Fill="{TemplateBinding ButtonForeground}" Margin="4" Points="0,0 7,0 3.5,3.5" Stretch="Uniform" Width="7" Height="4" HorizontalAlignment="Center" VerticalAlignment="Center" />
                </Button>
                <c1:C1MaskedTextBox x:Name="TextBox" Cursor="IBeam" BorderThickness="0" Foreground="{TemplateBinding Foreground}" Background="Transparent" SelectOnFocus="Always" SelectionBackground="{TemplateBinding SelectionBackground}" SelectionForeground="{TemplateBinding SelectionForeground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FocusCuesVisibility="Collapsed" DisabledCuesVisibility="Collapsed" Padding="{TemplateBinding Padding}" Margin="{TemplateBinding BorderThickness}" />
            </Grid>
            <Popup x:Name="Popup" />
            <Border x:Name="FocusedVisualElement" BorderBrush="{TemplateBinding FocusBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" Visibility="{TemplateBinding FocusCuesVisibility}" Opacity="0" />
            <Border x:Name="MouseOverElement" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" 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>

    <Style TargetType="c1datetime:C1DatePicker">
        
        
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="SelectionBackground" Value="{StaticResource WpfInputSelectedBackgroundBrush}" />
        <Setter Property="SelectionForeground" Value="{StaticResource WpfInputSelectedForegroundBrush}" />
        <Setter Property="ButtonBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="FocusBrush" Value="{StaticResource WpfInputFocusBrush}" />
        <Setter Property="MinWidth" Value="80" />
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="ButtonForeground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="CornerRadius" Value="{StaticResource GeneralCornerRadius}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="Template" Value="{StaticResource C1DatePickerTemplate}" />
    </Style>


    <!--******************* C1TimeEditor ********************-->

    <!-- Thickness @ TimeEditor Button -->
    <Thickness x:Key="TimeEditorButtonBorderThickness">0</Thickness>
    <!-- Margin @ TimeEditor IncreaseButton -->
    <Thickness x:Key="TimeEditorIncreaseButtonMargin">0</Thickness>
    <!-- Margin @ TimeEditor DecreaseButton -->
    <Thickness x:Key="TimeEditorDecreaseButtonMargin">0</Thickness>

    <!-- TimeEditor Default Style -->
    <Style TargetType="c1datetime:C1TimeEditor">
        
        
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="SelectionBackground" Value="{StaticResource WpfInputSelectedBackgroundBrush}" />
        <Setter Property="SelectionForeground" Value="{StaticResource WpfInputSelectedForegroundBrush}" />
        <Setter Property="ButtonBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="FocusBrush" Value="{StaticResource WpfInputFocusBrush}" />
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="ButtonForeground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="CornerRadius" Value="{StaticResource GeneralCornerRadius}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="Interval" Value="33" />
        <Setter Property="Delay" Value="500" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1datetime:C1TimeEditor">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <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>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonsVisibilityStates">
                                <VisualState x:Name="HideButtons">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IncreaseBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DecreaseBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowButtons">
                                    <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>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition x:Name="ButtonsColumn" Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Border x:Name="BackgroundElement" Grid.ColumnSpan="3" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" />
                            <c1:C1MaskedTextBox x:Name="TextBox" Grid.Column="0" BorderThickness="0" Foreground="{TemplateBinding Foreground}" Background="Transparent" SelectOnFocus="Always" SelectionForeground="{TemplateBinding SelectionForeground}" SelectionBackground="{TemplateBinding SelectionBackground}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Text="" FocusCuesVisibility="Collapsed" DisabledCuesVisibility="Collapsed" Padding="{TemplateBinding Padding}" Margin="{TemplateBinding BorderThickness}" />
                            <Rectangle Fill="{TemplateBinding BorderBrush}" Style="{StaticResource DatePickerItemSeparator}" Grid.Column="1" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=top-bottom}" />
                            <Grid Grid.Column="2" Margin="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideThicknessConverter}, ConverterParameter=top-right-bottom}">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <Border x:Name="IncreaseBorder">
                                    <RepeatButton x:Name="Increase" Delay="{TemplateBinding Delay}" Interval="{TemplateBinding Interval}" Padding="0" IsTabStop="False" Background="{TemplateBinding ButtonBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{StaticResource TimeEditorButtonBorderThickness}" Margin="{StaticResource TimeEditorIncreaseButtonMargin}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter='topright'}" Style="{StaticResource ClearStyleButtonStyle}" Width="15">
                                        <Polygon Fill="{TemplateBinding ButtonForeground}" Stretch="Uniform" Points="1,0 2,1 0,1" Width="5" Height="5" Margin="0 0 1 1" />
                                        <!-- Height is required for WPF version -->
                                    </RepeatButton>
                                </Border>
                                <Border x:Name="DecreaseBorder" Grid.Row="1" Margin="{StaticResource TimeEditorDecreaseButtonMargin}">
                                    <RepeatButton x:Name="Decrease" Delay="{TemplateBinding Delay}" Interval="{TemplateBinding Interval}" Padding="0" IsTabStop="False" Background="{TemplateBinding ButtonBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{StaticResource TimeEditorButtonBorderThickness}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" c1:ClearStyleExtensions.CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource sideRadiusConverter}, ConverterParameter='bottomright'}" Style="{StaticResource ClearStyleButtonStyle}" Width="15">
                                        <Polygon Fill="{TemplateBinding ButtonForeground}" Stretch="Uniform" Points="0,0 2,0 1,1" Width="5" Height="5" Margin="0 0 1 0" />
                                        <!-- Height is required for WPF version -->
                                    </RepeatButton>
                                </Border>
                            </Grid>
                            <Border x:Name="FocusedVisualElement" Grid.ColumnSpan="3" BorderBrush="{TemplateBinding FocusBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" Visibility="{TemplateBinding FocusCuesVisibility}" Opacity="0" />
                            <Border x:Name="MouseOverElement" Grid.ColumnSpan="3" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed" />
                            <Border x:Name="DisabledVisualElement" Grid.ColumnSpan="3" Background="{StaticResource DisabledBrush}" CornerRadius="{TemplateBinding CornerRadius}" IsHitTestVisible="False" Opacity="0" Visibility="{TemplateBinding DisabledCuesVisibility}" />
                        </Grid>
                        <c1:C1ValidationDecorator x:Name="ValidationDecorator" Target="{Binding RelativeSource={RelativeSource TemplatedParent}}" Style="{TemplateBinding ValidationDecoratorStyle}" CornerRadius="{TemplateBinding CornerRadius}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************** C1DateTimePicker ********************-->

    <!-- C1DateTimePicker Default -->
    <Style TargetType="c1datetime:C1DateTimePicker">
        
        
        
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="SelectionBackground" Value="{StaticResource WpfInputSelectedBackgroundBrush}" />
        <Setter Property="SelectionForeground" Value="{StaticResource WpfInputSelectedForegroundBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="FocusBrush" Value="{StaticResource WpfInputFocusBrush}" />
        <Setter Property="ButtonBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="ButtonForeground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="CornerRadius" Value="{StaticResource GeneralCornerRadius}" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="MinTimeEditorWidth" Value="58" />
        <Setter Property="MinDatePickerWidth" Value="80" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1datetime:C1DateTimePicker">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement2" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver" />
                            </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>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <c1datetime:C1DatePicker x:Name="DatePicker" Grid.Column="0" DisabledCuesVisibility="Collapsed" MinWidth="{Binding MinDatePickerWidth, RelativeSource={RelativeSource TemplatedParent}}" AllowNull="{Binding AllowNull, RelativeSource={RelativeSource TemplatedParent}}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Prompt="{Binding Prompt, RelativeSource={RelativeSource TemplatedParent}}" Watermark="{Binding DateWatermark, RelativeSource={RelativeSource TemplatedParent}}" Mask="{Binding DateMask, RelativeSource={RelativeSource TemplatedParent}}" CustomFormat="{Binding CustomDateFormat, RelativeSource={RelativeSource TemplatedParent}}" SelectedDateFormat="{Binding DateFormat, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Foreground="{TemplateBinding Foreground}" SelectionBackground="{TemplateBinding SelectionBackground}" SelectionForeground="{TemplateBinding SelectionForeground}" MouseOverBrush="{TemplateBinding MouseOverBrush}" PressedBrush="{TemplateBinding PressedBrush}" FocusCuesVisibility="{TemplateBinding FocusCuesVisibility}" FocusBrush="{TemplateBinding FocusBrush}" ButtonBackground="{TemplateBinding ButtonBackground}" ButtonForeground="{TemplateBinding ButtonForeground}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" CornerRadius="{TemplateBinding CornerRadius}" />
                        <c1datetime:C1TimeEditor x:Name="TimeEditor" Grid.Column="1" DisabledCuesVisibility="Collapsed" MinWidth="{Binding MinTimeEditorWidth, RelativeSource={RelativeSource TemplatedParent}}" AllowNull="{Binding AllowNull, RelativeSource={RelativeSource TemplatedParent}}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Prompt="{Binding Prompt, RelativeSource={RelativeSource TemplatedParent}}" Watermark="{Binding TimeWatermark, RelativeSource={RelativeSource TemplatedParent}}" Mask="{Binding TimeMask, RelativeSource={RelativeSource TemplatedParent}}" CustomFormat="{Binding CustomTimeFormat, RelativeSource={RelativeSource TemplatedParent}}" Increment="{Binding TimeIncrement, RelativeSource={RelativeSource TemplatedParent}}" Format="{Binding TimeFormat, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Foreground="{TemplateBinding Foreground}" SelectionBackground="{TemplateBinding SelectionBackground}" SelectionForeground="{TemplateBinding SelectionForeground}" MouseOverBrush="{TemplateBinding MouseOverBrush}" PressedBrush="{TemplateBinding PressedBrush}" FocusCuesVisibility="{TemplateBinding FocusCuesVisibility}" FocusBrush="{TemplateBinding FocusBrush}" ButtonBackground="{TemplateBinding ButtonBackground}" ButtonForeground="{TemplateBinding ButtonForeground}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" CornerRadius="{TemplateBinding CornerRadius}" />
                        <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{TemplateBinding CornerRadius}" IsHitTestVisible="False" Visibility="Collapsed" />
                        <Border x:Name="DisabledVisualElement2" Background="{StaticResource DisabledBrush}" CornerRadius="{TemplateBinding CornerRadius}" IsHitTestVisible="False" Visibility="Collapsed" Margin="3,0,0,0" Grid.Column="1" />
                        <c1:C1ValidationDecorator x:Name="ValidationDecorator" Target="{Binding RelativeSource={RelativeSource TemplatedParent}}" Style="{TemplateBinding ValidationDecoratorStyle}" Grid.ColumnSpan="2" CornerRadius="{TemplateBinding CornerRadius}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
