<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="CheckBoxOuterBackground_Normal" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="CheckBoxOuterBorder_Normal" Color="#FF83A5D2" />
<SolidColorBrush x:Key="CheckBoxOuterBorder_MouseOver" Color="#FF83A5D2" />
<LinearGradientBrush x:Key="CheckBoxInnerBorder_MouseOver" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
		<GradientStop Color="#FFFFC314" Offset="0"/>
		<GradientStop Color="#FFF2D9A6" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="CheckBoxInnerBackground_MouseOver" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
		<GradientStop Color="#FFFFE89B"/>
		<GradientStop Color="#FFFFFFFF" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="CheckBoxTickStroke_MouseOver" Color="#FF3C6AA3" />
<SolidColorBrush x:Key="CheckBoxIntermediateBorder_Pressed" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="CheckBoxOuterBorder_Pressed" Color="#FF83A5D2" />
<LinearGradientBrush x:Key="CheckBoxInnerBorder_Pressed" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
		<GradientStop Color="#FF626262" Offset="0"/>
		<GradientStop Color="#FFF4C198" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="CheckBoxInnerBackground_Pressed" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
		<GradientStop Color="#FFFAAB02" Offset="0"/>
		<GradientStop Color="#FFFDF5D7" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="CheckBoxTickStroke_Pressed" Color="#FF000000" />
<SolidColorBrush x:Key="CheckBoxIntermediateBorder_Disabled" Color="#FFEEEEEE" />
<SolidColorBrush x:Key="CheckBoxOuterBorder_Disabled" Color="#FF83A5D2" />
<SolidColorBrush x:Key="CheckBoxOuterBackground_Disabled" Color="#FFEEEEEE" />
<SolidColorBrush x:Key="CheckBoxInnerBorder_Disabled" Color="#FFD7E1EE" />
<SolidColorBrush x:Key="CheckBoxInnerBackground_Disabled" Color="#FFE2F0FD" />
<SolidColorBrush x:Key="CheckBoxTickStroke_Disabled" Color="#FF8D8D8D" />
<SolidColorBrush x:Key="CheckBoxOuterBorder_Focused" Color="#FF83A5D2" />
<SolidColorBrush x:Key="CheckBoxOuterBackground_Focused" Color="#FFFFFFFF" />
<LinearGradientBrush x:Key="CheckBoxInnerBorder_Normal" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
		<GradientStop Color="#FF83A5D2"/>
		<GradientStop Color="#FFC7DAF6" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="CheckBoxInnerBackground_Normal" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
		<GradientStop Color="#FFC7DEFC" Offset="0"/>
		<GradientStop Color="White" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="CheckBoxTickStroke_Normal" Color="#FF3C6AA3" />
<MyTheme:MyTheme x:Key="Theme" />

    
    <!--  style for CheckBox -->
    <Style  TargetType="CheckBox">
        <Setter Property="Background" Value="{StaticResource CheckBoxOuterBackground_Normal}" />
		<Setter Property="BorderBrush" Value="{StaticResource CheckBoxOuterBorder_Normal}" />
        <Setter Property="BorderThickness" Value="1" />
		<Setter Property="HorizontalContentAlignment" Value="Left" />
		<Setter Property="VerticalContentAlignment" Value="Top" />
		
		<Setter Property="Padding" Value="4 0 0 0" />
		
		
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid Background="Transparent">
                        
						<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 CheckBoxOuterBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxInnerBorder_MouseOver}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxInnerBackground_MouseOver}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Stroke">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTickStroke_MouseOver}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="Stroke">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTickStroke_MouseOver}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IntermediateBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxIntermediateBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxInnerBorder_Pressed}" />
										</ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxInnerBackground_Pressed}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Stroke">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTickStroke_Pressed}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="Stroke">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTickStroke_Pressed}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="Disabled">
									<Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IntermediateBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxIntermediateBorder_Disabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxOuterBorder_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxOuterBackground_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxInnerBorder_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxInnerBackground_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentItem" Storyboard.TargetProperty="Opacity">
											<DiscreteDoubleKeyFrame KeyTime="0" Value="0.5" />
										</DoubleAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Stroke">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTickStroke_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="Stroke">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTickStroke_Disabled}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="CheckStates">
								<vsm:VisualState x:Name="Unchecked" />
								<vsm:VisualState x:Name="Checked">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="Indeterminate">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="FocusStates">
								<vsm:VisualState x:Name="Focused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBorder" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="Unfocused" />
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="ValidationStates">
								<vsm:VisualState x:Name="Valid"/>
								<vsm:VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</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>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
						</vsm:VisualStateManager.VisualStateGroups>
                        

						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>
                        
						<Grid Width="15" Height="15" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Border x:Name="FocusBorder" Width="13" Height="13" Visibility="Collapsed" 
                                    BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource CheckBoxOuterBorder_Focused}" 
                                    Background="{StaticResource CheckBoxOuterBackground_Focused}"/>
                            
                            <Border x:Name="OuterBorder" Width="13" Height="13" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" />
                            <Border x:Name="IntermediateBorder" Width="11" Height="11" VerticalAlignment="Center" HorizontalAlignment="Center" 
                                    BorderThickness="1" BorderBrush="{TemplateBinding Background}">
                                    <Border x:Name="InnerBorder" BorderThickness="1" BorderBrush="{StaticResource CheckBoxInnerBorder_Normal}" Background="{StaticResource CheckBoxInnerBackground_Normal}" />
                            </Border>							
							<Path x:Name="CheckIcon" Visibility="Collapsed" Width="9" Height="9" Stretch="None" StrokeThickness="1.5" Stroke="{StaticResource CheckBoxTickStroke_Normal}" Data="M1.5,6 L3.5,7.5 L7,2" />
							<Path x:Name="IndeterminateIcon" Visibility="Collapsed" Width="9" Height="9" Stretch="None" StrokeThickness="1.5" Stroke="{StaticResource CheckBoxTickStroke_Normal}" Data="M2,4 L 7,4" />

							
							<telerikChromes:ValidationTooltip x:Name="ValidationTooltip"
								Visibility="Collapsed"
								Width="13" Height="13" CornerRadius="0"
								telerik:StyleManager.Theme="{StaticResource Theme}"
								TooltipPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" TooltipContent="{Binding Path=(Validation.Errors), RelativeSource={RelativeSource TemplatedParent}}">
							</telerikChromes:ValidationTooltip>
							
						</Grid>

						<ContentPresenter x:Name="ContentItem"
								Grid.Column="1"
								Margin="{TemplateBinding Padding}"
								Content="{TemplateBinding Content}"
								ContentTemplate="{TemplateBinding ContentTemplate}"
								HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								 />
                    </Grid>

                    

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