Slider.IsSelectionRangeEnabled Property


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

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

member IsSelectionRangeEnabled : bool with get, set

Property Value

Type: System.Boolean

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

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.

Identifier field


Metadata properties set to true


The following example shows how to set the IsSelectionRangeEnabled property.

No code example is currently available or this language may not be supported.
<Slider Width="100" 
        Minimum="1" Maximum="10" 
        AutoToolTipPrecision="2" AutoToolTipPlacement="BottomRight"
        Ticks="0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5" 
        SelectionStart="2.5" SelectionEnd="7.5" Name="mySlider"/>

.NET Framework
Available since 3.0
Return to top