In This Article

Tab Row Toolbar

The ribbon's tab row toolbar is a control that can optionally be displayed on the far-right side of the ribbon, in the same row as the ribbon tabs. It generally shows common controls that are always available, such as Sharing or Feedback buttons.

Screenshot

A Share button in the ribbon tab row toolbar

Defining a Tab Row Toolbar

The tab row toolbar can be defined in XAML or code-behind by assigning a RibbonTabRowToolBar control instance to the Ribbon.TabRowToolBarContent property.

Note

See the "MVVM Support" section below for details on alternatively using this property to define the toolbar via MVVM techniques.

The items to be displayed in the toolbar are assigned to the RibbonTabRowToolBar.Items collection. Since the control derives from ItemsControl, items may alternatively be bound into the controls's ItemsSource property.

This code sample shows how to define the tab row toolbar items for a ribbon.

xmlns:bars="http://schemas.actiprosoftware.com/winfx/xaml/bars"
...
<bars:RibbonContainerPanel>
	<bars:Ribbon>

		<bars:Ribbon.TabRowToolBarContent>
			<bars:RibbonTabRowToolBar>
				<bars:BarButton Key="Share" Command="{Binding ShareCommand}" SmallImageSource="/Images/Share16.png" />
			</bars:RibbonTabRowToolBar>
		</bars:Ribbon.TabRowToolBarContent>

		...
	</bars:Ribbon>
</bars:RibbonContainerPanel>

MVVM Support

The tab row toolbar may also be defined by setting the Ribbon.TabRowToolBarContent property to a view model that generates a RibbonTabRowToolBar control via the ribbon's ItemContainerTemplateSelector.

The optional companion MVVM Library defines a RibbonTabRowToolBarViewModel class that is intended to be used as a view model for a RibbonTabRowToolBar control, and the BarControlTemplateSelector class in the library generates a RibbonTabRowToolBar for that view model.

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.

Customizing the Toolbar Style

The RibbonTabRowToolBar instance can be customized by setting a Style to the Ribbon.TabRowToolBarStyle property. This Style is applied to the control when it is added to the ribbon.