Share via


Slider.IsDirectionReversed Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets a value that indicates the direction of increasing value.

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

Syntax

'Declaration
Public Property IsDirectionReversed As Boolean
public bool IsDirectionReversed { get; set; }
<Slider IsDirectionReversed="bool"/>

Property Value

Type: System.Boolean
true if the direction of increasing value is to the left for a horizontal slider or down for a vertical slider; otherwise, false. The default is false.

Remarks

Dependency property identifier field: IsDirectionReversedProperty

The value of this property determines the direction of increasing value of a Slider. For example, when you move the Thumb control up on a vertical Slider when the IsDirectionReversed property is set to false, the Value of the Slider increases. If the value of the IsDirectionReversed property is changed to true, the Value of the Slider decreases as the Thumb moves up.

Examples

The following code example shows how to set the IsDirectionReversed property to specify the direction of increasing value.

Run this sample

<Slider Margin="0,5,0,20"
    x:Name="slider4"  
    Minimum="0" 
    Maximum="10"
    IsDirectionReversed="true"/>

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.