Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToolBar.Orientation Property

 

Gets the orientation of the ToolBar.

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

public Orientation Orientation { get; }

Property Value

Type: System.Windows.Controls.Orientation

The toolbar orientation. The default is Horizontal.

This property gets its value from the parent ToolBarTray.

Identifier field

OrientationProperty

Metadata properties set to true

None

The following example shows how to determine whether a ToolBar is vertical.

if (tb1.Orientation == Orientation.Vertical)
{
    btnText.Content = "This is a vertical toolbar.";
}

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft