Home > DeveloperSection > Articles > ToolBarTray Control in WPF

ToolBarTray Control in WPF

1 Comment(s)
 18100  View(s)
Rate this:

ToolBarTray Control in WPF

In XAML <ToolBarTray /> element is used to create TollBarTray control in WPF. We can use ToolBarTray control to position Toolbar into ToolBarTray control. Use the Band and BandIndex property to position the toolbar into toolbartray. Band property indicates the position in which the toolbar is placed within its parent toolbartray and BandIndex property indicates the order in which toolbar is placed within its band. We can specify when an item on tool bar is placed on the overflow panel by setting the ToolBar.OverFlowMode attached property to OverflowMode.Always, OverflowMode.Never, or OverflowMode.AsNeeded.

Following XAML code snippet represent use of toolbar controls in WPF


        <ToolBarTray Background="AntiqueWhite">

            <ToolBar Band="1" BandIndex="1">





            <ToolBar BandIndex="2" Band="2">




            <ToolBar Band="2" BandIndex="2">



                <Separator />




                <Separator />






Output of the above code snippet is as follows

ToolBarTray control in WPF

ToolBarTray control in WPF


ToolBarTray control in WPF

By James  on   5 years ago
Its really good.

Don't want to miss updates? Please click the below button!

Follow MindStick