ScrollBar.Orientation Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets whether the ScrollBar is displayed horizontally or vertically.

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

public Orientation Orientation { get; set; }

Property Value

Type: System.Windows.Controls.Orientation

An Orientation enumeration value that defines whether the ScrollBar is displayed horizontally or vertically. The default is Vertical.

Identifier field

OrientationProperty

Metadata properties set to true

None

The following example shows how to set the Orientation property for a ScrollBar control.

myScrollBar.Orientation = Orientation.Horizontal;
<ScrollBar Name="myScrollBar" Orientation="Horizontal"/>

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: