<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">
	
	<SolidColorBrush x:Key="RangeMiddleThumbBackground" Color="#FF808080" />
	<SolidColorBrush x:Key="ArrowFill_Normal" Color="#FFCCCCCC" />
	<SolidColorBrush x:Key="RangeControlBackground" Color="#FF3D3D3D" />
	
	<Style x:Key="ThumbBaseStyle" TargetType="Thumb">
		<Setter Property="Background" Value="{StaticResource RangeMiddleThumbBackground}" />
		<Setter Property="Foreground" Value="{StaticResource ArrowFill_Normal}" />
	</Style>
	
	<Style x:Key="MiddleThumbStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbBaseStyle}">
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Thumb">
					<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding Background}" Background="Transparent">
						<Grid Background="Transparent">
							<Path x:Name="TopLeftCorner" Fill="{TemplateBinding Background}" Grid.Row="1" Width="4" Height="4" HorizontalAlignment="Left" VerticalAlignment="Top">
								<Path.Clip>
									<RectangleGeometry Rect="0 0 4 4" />
								</Path.Clip>
								<Path.Data>
									<GeometryGroup FillRule="EvenOdd">
										<RectangleGeometry Rect="0 0 5 5" />
										<EllipseGeometry Center="4 4" RadiusX="4" RadiusY="4" />
									</GeometryGroup>
								</Path.Data>
							</Path>
							<Path x:Name="TopRightCorner" Fill="{TemplateBinding Background}" Grid.Row="1" Width="4" Height="4" HorizontalAlignment="Right" VerticalAlignment="Top">
								<Path.Clip>
									<RectangleGeometry Rect="0 0 4 4" />
								</Path.Clip>
								<Path.Data>
									<GeometryGroup FillRule="EvenOdd">
										<RectangleGeometry Rect="-1 0 5 5" />
										<EllipseGeometry Center="0 4" RadiusX="4" RadiusY="4" />
									</GeometryGroup>
								</Path.Data>
							</Path>
							<Path x:Name="BottomRightCorner" Fill="{TemplateBinding Background}" Grid.Row="1" Width="4" Height="4" HorizontalAlignment="Right" VerticalAlignment="Bottom">
								<Path.Clip>
									<RectangleGeometry Rect="0 0 4 4" />
								</Path.Clip>
								<Path.Data>
									<GeometryGroup FillRule="EvenOdd">
										<RectangleGeometry Rect="-1 -1 5 5" />
										<EllipseGeometry Center="0 0" RadiusX="4" RadiusY="4" />
									</GeometryGroup>
								</Path.Data>
							</Path>
							<Path x:Name="BottomLeftCorner" Fill="{TemplateBinding Background}" Grid.Row="1" Width="4" Height="4" HorizontalAlignment="Left" VerticalAlignment="Bottom">
								<Path.Clip>
									<RectangleGeometry Rect="0 0 4 4" />
								</Path.Clip>
								<Path.Data>
									<GeometryGroup FillRule="EvenOdd">
										<RectangleGeometry Rect="0 -1 5 5" />
										<EllipseGeometry Center="4 0" RadiusX="4" RadiusY="4" />
									</GeometryGroup>
								</Path.Data>
							</Path>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="HorizontalRangeThumbStartStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbBaseStyle}">
		<Setter Property="Cursor" Value="SizeWE"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Thumb">
					<Border CornerRadius="4 0 0 4" Background="{TemplateBinding Background}">
						<Path Fill="{TemplateBinding Foreground}" Margin="4" Width="6" Height="7" Data="M6,0 L6,7 0,3.5Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="HorizontalRangeThumbEndStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbBaseStyle}">
		<Setter Property="Cursor" Value="SizeWE"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Thumb">
					<Border Background="{TemplateBinding Background}" CornerRadius="0 4 4 0">
						<Path Fill="{TemplateBinding Foreground}" Margin="4" Width="6" Height="7" Data="M0,0 L6,3.5 0,7Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="VerticalRangeThumbStartStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbBaseStyle}">
		<Setter Property="Cursor" Value="SizeNS"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Thumb">
					<Border CornerRadius="0 0 4 4" Background="{TemplateBinding Background}">
						<Path Fill="{TemplateBinding Foreground}" Margin="4" Width="7" Height="6" Data="M0,0 L7,0 3.5,6Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="VerticalRangeThumbEndStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbBaseStyle}">
		<Setter Property="Cursor" Value="SizeNS"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Thumb">
					<Border Background="{TemplateBinding Background}" CornerRadius="4 4 0 0">
						<Path Fill="{TemplateBinding Foreground}" Margin="4" Width="7" Height="6" Data="M0,6 L7,6 3.5,0Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="HorizontalDecreaseButtonStyle" TargetType="RepeatButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Border Background="Transparent">
						<Path Fill="{StaticResource ArrowFill_Normal}" Margin="2" Width="8" Height="9" Data="M8,0 L0,4.5 8,9Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="HorizontalIncreaseButtonStyle" TargetType="RepeatButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Border Background="Transparent">
						<Path Fill="{StaticResource ArrowFill_Normal}" Margin="2" Width="8" Height="9" Data="M0,0 L8,4.5 0,9Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="VerticalDecreaseButtonStyle" TargetType="RepeatButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Border Background="Transparent">
						<Path Fill="{StaticResource ArrowFill_Normal}" Margin="2" Width="9" Height="8" Data="M0,0 L4.5,8 9,0Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="VerticalIncreaseButtonStyle" TargetType="RepeatButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Border Background="Transparent">
						<Path Fill="{StaticResource ArrowFill_Normal}" Margin="2" Width="9" Height="8" Data="M0,8 L9,8 4.5,0Z" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="RadRangeControlStyle" TargetType="telerik:RadRangeControl">
		<Setter Property="Minimum" Value="0"/>
		<Setter Property="Maximum" Value="100"/>
		<Setter Property="SmallChange" Value="1"/>
		<Setter Property="LargeChange" Value="5"/>
		<Setter Property="MinimumRangeSpan" Value="0.5"/>
		<Setter Property="IsMouseWheelEnabled" Value="True"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="Background" Value="{StaticResource RangeControlBackground}" />
		<Setter Property="Delay" Value="250"/>
		<Setter Property="StepAction" Value="MoveRange"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="telerik:RadRangeControl">
					<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
						<Grid>
							<Grid x:Name="HorizontalTemplate">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<ContentPresenter x:Name="HorizontalContentPresenter" Grid.Column="1"/>
								<Grid x:Name="HorizontalRangeTemplate" Grid.Column="1">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition Width="*"/>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition Width="Auto"/>
									</Grid.ColumnDefinitions>
									<Rectangle x:Name="HorizontalRangeLargeDecrease" Grid.Column="0" Fill="Transparent"/>
									<Thumb x:Name="HorizontalRangeStartThumb" Style="{StaticResource HorizontalRangeThumbStartStyle}" Grid.Column="1" IsEnabled="{TemplateBinding IsEnabled}" Visibility="{TemplateBinding ThumbVisibility}" VerticalAlignment="Stretch" />
									<Thumb x:Name="HorizontalRangeMiddleThumb" Style="{StaticResource MiddleThumbStyle}" Grid.Column="2" BorderThickness="0 3 0 3" IsEnabled="{TemplateBinding IsEnabled}" VerticalAlignment="Stretch" />
									<Thumb x:Name="HorizontalRangeEndThumb" Style="{StaticResource HorizontalRangeThumbEndStyle}" Grid.Column="3" IsEnabled="{TemplateBinding IsEnabled}" Visibility="{TemplateBinding ThumbVisibility}" VerticalAlignment="Stretch" />
									<Rectangle x:Name="HorizontalRangeLargeIncrease" Grid.Column="4" Fill="Transparent"/>
								</Grid>
								<RepeatButton x:Name="HorizontalDecreaseHandle" Style="{StaticResource HorizontalDecreaseButtonStyle}" Grid.Column="0" Delay="{TemplateBinding Delay}" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Visibility="{TemplateBinding HandlesVisibility}" />
								<RepeatButton x:Name="HorizontalIncreaseHandle" Style="{StaticResource HorizontalIncreaseButtonStyle}" Grid.Column="2" Delay="{TemplateBinding Delay}" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Visibility="{TemplateBinding HandlesVisibility}" />
							</Grid>
							<Grid x:Name="VerticalTemplate">
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="*"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<ContentPresenter x:Name="VerticalContentPresenter" Grid.Row="1"/>
								<Grid x:Name="VerticalRangeTemplate" Margin="3,0" Grid.Row="1">
									<Grid.RowDefinitions>
										<RowDefinition Height="Auto"/>
										<RowDefinition Height="Auto"/>
										<RowDefinition Height="*"/>
										<RowDefinition Height="Auto"/>
										<RowDefinition Height="Auto"/>
									</Grid.RowDefinitions>
									<Rectangle x:Name="VerticalRangeLargeIncrease" Fill="Transparent" Grid.Row="0"/>
									<Thumb x:Name="VerticalRangeEndThumb" Style="{StaticResource VerticalRangeThumbEndStyle}" HorizontalAlignment="Stretch" IsEnabled="{TemplateBinding IsEnabled}" Grid.Row="1" Visibility="{TemplateBinding ThumbVisibility}" />
									<Thumb x:Name="VerticalRangeMiddleThumb" Style="{StaticResource MiddleThumbStyle}" Grid.Row="2" BorderThickness="3 0 3 0" HorizontalAlignment="Stretch" IsEnabled="{TemplateBinding IsEnabled}" />
									<Thumb x:Name="VerticalRangeStartThumb" Style="{StaticResource VerticalRangeThumbStartStyle}" HorizontalAlignment="Stretch" IsEnabled="{TemplateBinding IsEnabled}" Grid.Row="3" Visibility="{TemplateBinding ThumbVisibility}" />
									<Rectangle x:Name="VerticalRangeLargeDecrease" Fill="Transparent" Grid.Row="4"/>
								</Grid>
								<RepeatButton x:Name="VerticalIncreaseHandle"  Style="{StaticResource VerticalIncreaseButtonStyle}" Delay="{TemplateBinding Delay}" HorizontalAlignment="Stretch" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Grid.Row="0" Visibility="{TemplateBinding HandlesVisibility}" />
								<RepeatButton x:Name="VerticalDecreaseHandle" Style="{StaticResource VerticalDecreaseButtonStyle}" Delay="{TemplateBinding Delay}" HorizontalAlignment="Stretch" IsEnabled="{TemplateBinding IsEnabled}" Interval="{TemplateBinding RepeatInterval}" Grid.Row="2" Visibility="{TemplateBinding HandlesVisibility}" />
							</Grid>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="telerik:RadRangeControl" BasedOn="{StaticResource RadRangeControlStyle}" />
	
</ResourceDictionary>