This documentation is archived and is not being maintained.

ToolBarTray.Orientation Property

Specifies the orientation of a ToolBarTray. This is a dependency property.

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

public Orientation Orientation { get; set; }
<object Orientation="Orientation" .../>

Property Value

Type: System.Windows.Controls.Orientation
One of the Orientation values. The default is Orientation.Horizontal.

Identifier field


Metadata properties set to true


The following example shows how to use the Orientation property to set the orientation of the tool bar tray; this determines the orientation of the tool bar.

<ToolBarTray Orientation="Vertical" 
             Background="White" >
  <ToolBar Band="1" BandIndex="1">
      <Image Source="toolbargraphics\copy.bmp" />
      <Image Source="toolbargraphics\paste.bmp" />
  <ToolBar Band="2" BandIndex="1">
      <Image Source="toolbargraphics\undo.bmp" />
      <Image Source="toolbargraphics\redo.bmp" />

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0