<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:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
		xmlns:sys="clr-namespace:System;assembly=mscorlib"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		mc:Ignorable="d">

    <telerik:Expression_DarkTheme x:Key="Theme" />
	
	<LinearGradientBrush x:Key="CheckBoxBorder" EndPoint="1,0.5" StartPoint="0,0.5">
		<GradientStop Color="#FF707070" Offset="0"/>
		<GradientStop Color="#FFA3A3A3" Offset="0.5"/>
		<GradientStop Color="#FF707070" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="CheckBoxBackground" Color="#FF575859" />
	<SolidColorBrush x:Key="CheckBoxForeground" Color="#FFDDDDDD" />
	
	<LinearGradientBrush x:Key="CheckBoxBorder_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="CheckBoxBackground_MouseOver" Color="#FF878787" />
	
	<LinearGradientBrush x:Key="CheckBoxBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FF616060" Offset="0"/>
		<GradientStop Color="#FFCDCDCD" Offset="1"/>
		<GradientStop Color="#FFCDCDCD" Offset="0.14"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="CheckBoxBorder_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
		<GradientStop Color="#FF595959" Offset="0"/>
		<GradientStop Color="#FF595959" Offset="1"/>
		<GradientStop Color="#FFA3A3A3" Offset="0.5"/>
	</LinearGradientBrush>
	
	<SolidColorBrush x:Key="CheckBoxBorder_Disabled" Color="#FF5D5C5C" />
	<SolidColorBrush x:Key="CheckBoxBackground_Disabled" Color="#FF666666" />
	
	<SolidColorBrush x:Key="CheckBoxBorder_Focused" Color="#FF789FC3" />
	
	<SolidColorBrush x:Key="CheckBoxTick" Color="#FF262626" />
	<SolidColorBrush x:Key="CheckBoxTick_Disabled" Color="#FF868686" />
	
	<ControlTemplate x:Key="CheckBoxControlTemplate" TargetType="CheckBox">
		<Grid Background="Transparent">
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="Disabled">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Disabled}" />
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Disabled}" />
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="IndeterminateVisual">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}" />
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckedVisual">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}" />
							</ObjectAnimationUsingKeyFrames>
							<DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentVisual" d:IsOptimized="True"/>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Normal" />
					<VisualState x:Name="MouseOver" >
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual" d:IsOptimized="True"/>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Pressed" >
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
							<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual" d:IsOptimized="True"/>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Pressed}" />
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Pressed}" />
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
				<VisualStateGroup x:Name="CheckStates">
					<VisualState x:Name="Unchecked" />
					<VisualState x:Name="Checked" >
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedVisual">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Indeterminate" >
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminateVisual">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
				<VisualStateGroup x:Name="FocusStates">
					<VisualState x:Name="Focused" >
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusStatesVisual">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Visible</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Unfocused" />
				</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>
            
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			
			<Grid Grid.Column="0" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Top">
				<Border x:Name="BackgroundVisual" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" />
				<Border x:Name="MouseStatesVisual" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource CheckBoxBackground_MouseOver}" BorderBrush="{StaticResource CheckBoxBorder_MouseOver}" Visibility="Collapsed" />
				<Border x:Name="FocusStatesVisual" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource CheckBoxBorder_Focused}" Visibility="Collapsed" />
				<Border BorderThickness="{TemplateBinding BorderThickness}">
					<Grid x:Name="CheckMarks" Width="10" Height="10">
						<Path x:Name="CheckedVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L4,7 7.5,2" StrokeThickness="1.5" Stretch="None" />
						<Path x:Name="IndeterminateVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L8,5" StrokeThickness="2" Stretch="None" />
					</Grid>
				</Border>
				<telerikChromes:ValidationTooltip x:Name="ValidationTooltip" Margin="-1" Visibility="Collapsed" telerik:StyleManager.Theme="{StaticResource Theme}" TooltipPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" TooltipContent="{Binding (Validation.Errors), RelativeSource={RelativeSource TemplatedParent}}" />
			</Grid>
			
			<ContentPresenter x:Name="ContentVisual" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
		</Grid>
	</ControlTemplate>

    <Style x:Key="CheckBoxStyle" TargetType="CheckBox">
        <Setter Property="BorderThickness" Value="1" />
		<Setter Property="BorderBrush" Value="{StaticResource CheckBoxBorder}" />
		<Setter Property="Background" Value="{StaticResource CheckBoxBackground}" />
		<Setter Property="Foreground" Value="{StaticResource CheckBoxForeground}" />
		<Setter Property="HorizontalContentAlignment" Value="Left" />
		<Setter Property="VerticalContentAlignment" Value="Top" />
		
		<Setter Property="Padding" Value="4 0 0 0" />
		
        <Setter Property="Template" Value="{StaticResource CheckBoxControlTemplate}" />
    </Style>
	
	<Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}" />
    

</ResourceDictionary>