Work in progress on Contextual Tabs... currently in changeset 30658.

A contextual tab is a special type of tab that only appears under certain circumstances. An example of contextual tabs are the Design and Layout tabs of the TableTools context in Word that appears when editing a table.

In the Office Ribbon, creating a contextual tab is a two/three step process:

1. Create a context (i.e. Table Tools) by using the Context property of the Ribbon in the designer:


2. Create the tabs (i.e. Design and Layout) on the Ribbon and populate with panels and Ribbon items.
3. Assign the new tabs to desired context by changing the Context property on the tabs in the designer:


Some notes/provisos:

1. Contextual tabs should be moved to the end of the tab collection so they appear after all non-contextual tabs. The Ribbon will not do this for you.
2. Contextual tabs within the same context should be placed adjacent to one another, otherwise the context will span any tab in between.
3. If a context contains more than one tab, the context width will be the sum of the tab widths. If the context text is longer than this, it will be shown using ellipses.
4. A context and its tabs will not be visible by default. To show them, change the Visibility of the context to true. Tabs in a context will follow the visibility of the context.

Last edited Feb 13, 2015 at 3:02 AM by Stumpii, version 7


No comments yet.