Slider.Orientation Property

July 28, 2014

Gets or sets the orientation of a Slider.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Orientation Orientation { get; set; }
<Slider Orientation="Horizontal"/>
-or-
<Slider Orientation="Vertical"/>

Property Value

Type: System.Windows.Controls.Orientation
One of the System.Windows.Controls.Orientation values. The default is Horizontal.

Dependency property identifier field: OrientationProperty

The following code example shows how to set the Orientation property for a vertical slider.


<Slider Margin="0,5,0,20"
    x:Name="slider3" 
    Minimum="0" 
    Maximum="10"
    Height="100"
    Orientation="Vertical"/>


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft