<Window x:Class="SliderTest.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:SliderTest"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="MainWindow"
        Width="525"
        Height="350">

	<Window.Resources>
		<Style TargetType="Thumb" x:Key="LeftThumbStyle" BasedOn="{StaticResource ThumbStyle}">
			<Setter Property="Margin" Value="7 0 0 0" />
		</Style>

		<Style TargetType="Thumb" x:Key="RightThumbStyle" BasedOn="{StaticResource ThumbStyle}">
			<Setter Property="Margin" Value="-7 0 0 0" />
		</Style>
	</Window.Resources>
	<Grid>
		<StackPanel Grid.Row="1" Orientation="Vertical" Margin="8" VerticalAlignment="Center">
			<telerik:Label x:Name="sliderlabel" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" Margin="0"/>
			
			<telerik:RadSlider x:Name="slider" Orientation="Horizontal" telerik:StyleManager.Theme="Crystal" 
							HorizontalAlignment="Stretch"
							HorizontalContentAlignment="Stretch" Margin="0"
                           IsDeferredDraggingEnabled="True" 
						   HandlesVisibility="Visible"
						   IsMoveToPointEnabled="False"
						   MiddleThumbClickMode="DecreaseNearestThumb"
						   IsSelectionRangeEnabled="True"
						   AutoToolTipPlacement="BottomRight"
						   TickPlacement="TopLeft"
                         
						   SelectionStartChanged="slider_SelectionStartChanged"
						   SelectionEndChanged="slider_SelectionEndChanged" 
						   DragCompleted="slider_DragCompleted"
						   
						   ThumbStyle="{StaticResource LeftThumbStyle}"
						   AlternateThumbStyle="{StaticResource RightThumbStyle}"
						   Minimum="0" Maximum="150"
						   TickFrequency="10" MinimumRangeSpan="10"
						   IsSnapToTickEnabled="True">

				<telerik:RadSlider.AutoToolTipContentTemplate>
					<DataTemplate>
						<TextBlock Text="{Binding .,StringFormat=N0}"/>
					</DataTemplate>
				</telerik:RadSlider.AutoToolTipContentTemplate>

				<telerik:RadSlider.TickTemplate>
					<DataTemplate>
						<Canvas Width="1" Height="10">
							<TextBlock Text="{Binding}" Canvas.Top="-16" Canvas.Left="-12" Width="24" TextAlignment="Center" />
							<Rectangle Fill="Black" Height="5" Width="1" />
						</Canvas>
					</DataTemplate>
				</telerik:RadSlider.TickTemplate>
			</telerik:RadSlider>
		</StackPanel>
	</Grid>
</Window>