Orientation Property
Collapse the table of content
Expand the table of content

Slider.Orientation Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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:
© 2016 Microsoft