The StandaloneToolBar
control. It supports horizontal and vertical orientation, can make use of all the Bars controls and their features (including menu galleries), and overflows items to a popup. As with the other root bar controls, it can be fully configured via MVVM.
Usage Scenarios
Main Toolbar
The Standalone
A standalone toolbar is ideal as a main toolbar instead of a ribbon in apps with fewer commands
The main difference between the toolbar and a Simplified ribbon is in how overflow is achieved. The toolbar does not alter variant sizes of child controls and will overflow its items to a chevron popup when necessary. Whereas a Simplified ribbon can alter variant sizes of child controls when width is changed and overflows its items to popup menus when necessary.
The toolbar's Background
, BorderBrush
, BorderThickness
, CornerRadius
, HasItemSpacing
, and Padding
properties can be set to achieve an appearance like above.
Secondary Toolbar
Standalone
A standalone toolbar in a panel
In this usage scenario, it's generally better to use the default appearance that is more compact.
Orientation
The toolbar can arrange its child controls either horizontally (default) or vertically by setting the Orientation property.
Overflow Behavior
The Standalone
The Is
Child Controls
The toolbar can host all Bars controls that are meant for a toolbar context. A powerful feature is the ability to use a popup button or split button to show a graphically-rich menu gallery in its popup menu.
A standalone toolbar with a gallery open
Most controls define a ToolBarItemVariantBehavior
property (e.g., BarAlwaysSmall
, causing controls to display in a Small
variant, which often means icon only.
Since the standalone toolbar doesn't dynamically adjust child control variants as space decreases like a ribbon in Simplified
layout mode does, it only uses each child's ToolBarItemVariantBehavior
property as a guideline for what single variant size to support for that child. Therefore as an example, to display an icon and label for a particular button, set the BarAlwaysMedium
.
Key Tips
Key tips in child controls are supported, but are not active by default and must be enabled by setting the attached Bartrue
.
After the toolbar is marked as a root key tip scope, pressing keys like Alt will activate key tip mode the same as with a ribbon.
See the Key Tips topic for more information on key tips.
Screen Tips
The child controls support screen tips, which are formatted tool tips. Screen tips attempt to display below the Standalone
See the Screen Tips topic for more information on screen tips.
MVVM Support
The optional companion MVVM Library defines a Standalone
If a StandaloneDataContext
, a built-in ControlTheme
with resource key Standalone
Tip
See the MVVM Support topic for more information on how to use the library's view models and view templates to create and manage your application's bars controls with MVVM techniques.