ToolBar.Orientation Property


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

Gets the orientation of the ToolBar.

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

Public ReadOnly Property Orientation As Orientation

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


Metadata properties set to true


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

If tb1.Orientation = Orientation.Vertical Then
	btnText.Content = "This is a vertical toolbar."
End If

.NET Framework
Available since 3.0
Return to top