UXCommandBar is an items control designed specifically to host command buttons, although other UI elements are supported as well. Themed in Aero-theme by default, the command bar displays a 3D-style line separator in its top border which can be easily customizable through SeparatorBorder brush.
It also includes special access key and focus management features in which the contained buttons can be intuitively accessed through keyboard by pressing the first character of its text, i.e, c in Cancel.
UXCommandBar is an items control that derives from ISItemsControl class, which means that UXCommandBar can contain and display a collection of objects. You can display a collection of UIElement through the Items property, or a collection of data entity through the ItemsSource property.
For more information about items control, see Items Control Overview.
You use UXCommandBar to display a bar-like container that contains one or more command buttons such as UXButton. UXCommandBar is typically used within a dialog box, or a window, to represent the main actions of the dialog box like OK, Cancel and Apply. UXCommandBar is best displayed in the bottom edge of the dialog box.
UXCommandBar implements focus scope architecture which enables a variety of user experience features implemented in controls that support focus scope such as UXButton, UXToolBarButton and more. Specifically for UXCommandBar, it allows users to execute a button by simply pressing the first character of the button's text. Also known as access key, this behavior is implemented natively in the UXCommandBar and does not require you to write additional code.
To learn more about focus scope and other UX features, see User Experiences Overview.
Customizing UXCommandBar Appearance
You can easily customize the UXCommandBar appearance through the following properties.
If you would like to completely customize the control appearance or if you want to change the styles of each visual state, you can edit the template of the control and do the modification accordingly.
To learn how to customize the template and visual states, see Styles and Template Overview.