ToolBar.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 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: