Slider.IsSelectionRangeEnabled Property

Gets or sets whether the Slider displays a selection range along the Slider.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

public bool IsSelectionRangeEnabled { get; set; }
/** @property */
public boolean get_IsSelectionRangeEnabled ()

/** @property */
public void set_IsSelectionRangeEnabled (boolean value)

public function get IsSelectionRangeEnabled () : boolean

public function set IsSelectionRangeEnabled (value : boolean)

<object IsSelectionRangeEnabled="bool" .../>

Property Value

true if a selection range is displayed; otherwise, false. The default value is false.

Identifier field


Metadata properties set to true


The SelectionStart and SelectionEnd properties define a selection range and must be set for the selection range to appear when IsSelectionRangeEnabled is set to true.

The following illustration shows a Slider with a selection range defined.

A selection range defined for a Slider control

Slider selection range

This property is bound to the IsSelectionRangeEnabled property of the TickBar control that it implements.

The following example shows how to set the IsSelectionRangeEnabled property. For the complete sample, see Slider Sample.

<Slider Width="100" Value="2" Orientation="Horizontal" HorizontalAlignment="Left" 
IsSnapToTickEnabled="True" Maximum="3" TickPlacement="BottomRight" 
AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="2" 
Ticks="0, 1.1, 2.5, 3" IsSelectionRangeEnabled="true"
SelectionStart="1.1" SelectionEnd="3" Name="mySlider"/>

Slider hslider = new Slider();
hslider.Orientation = Orientation.Horizontal;
hslider.AutoToolTipPlacement =
hslider.AutoToolTipPrecision = 2;
hslider.IsDirectionReversed = true;
hslider.Width = 100;
hslider.IsMoveToPointEnabled = false;
hslider.SelectionStart = 1.1;
hslider.SelectionEnd = 3;
hslider.IsSelectionRangeEnabled = false;
hslider.IsSnapToTickEnabled = false;
hslider.TickFrequency = 3;
hslider.TickPlacement = TickPlacement.Both;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0