Orientation Property

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