ToolBarTray Class
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
'Declaration <ContentPropertyAttribute("ToolBars")> _ Public Class ToolBarTray Inherits FrameworkElement Implements IAddChild 'Usage Dim instance As ToolBarTray
/** @attribute ContentPropertyAttribute("ToolBars") */
public class ToolBarTray extends FrameworkElement implements IAddChild
ContentPropertyAttribute("ToolBars") public class ToolBarTray extends FrameworkElement implements IAddChild
<ToolBarTray> ToolBars </ToolBarTray>
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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.