ToolBarTray Class
Represents the container that handles the layout of a ToolBar.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
A ToolBarTray is responsible for handling placement, sizing, drag-and-drop operations, and rearranging of ToolBar controls. ToolBarTray controls are also responsible for managing the rows (or "bands") in which ToolBar controls appear. A ToolBarTray may be horizontal or vertical and, like a Menu, is often docked at the top of an application window.
The following example shows how to create a ToolBar inside a ToolBarTray. The example uses the BandIndex property to place tool bars inside tool bar trays.
<ToolBarTray Background="White"> <ToolBar Band="1" BandIndex="1"> <Button> <Image Source="toolbargraphics\cut.bmp" /> </Button> <Button> <Image Source="toolbargraphics\copy.bmp" /> </Button> <Button> <Image Source="toolbargraphics\paste.bmp" /> </Button> </ToolBar> <ToolBar Band="2" BandIndex="1"> <Button> <Image Source="toolbargraphics\undo.bmp" /> </Button> <Button> <Image Source="toolbargraphics\redo.bmp" /> </Button> </ToolBar> <ToolBar Band="2" BandIndex="2"> <Button> <Image Source="toolbargraphics\paint.bmp" /> </Button> <Button> <Image Source="toolbargraphics\spell.bmp" /> </Button> <Separator/> <Button> <Image Source="toolbargraphics\save.bmp" /> </Button> <Button> <Image Source="toolbargraphics\open.bmp" /> </Button> </ToolBar> </ToolBarTray>
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.