Nevron Open Vision Documentation
Layout Engine Overview

NOV ribbon dynamically resizes its content the size of the ribbon changes. This is done by a set of classes and interfaced that together form the Nevron Ribbon Layout Engine. When the size of the ribbon changes it notifies all ribbon groups in the selected tab page about this change and executes the special layout algorithm. As a result the groups try to fit in the available area shrinking into smaller states or collapsing.

Ribbon Group States and Priorities

The order in which groups shrink to smaller states or collapse is completely configurable by assigning priorities to the states of the groups. But before going deeper into the layout and its settings, let's take a look at the states a ribbon group commonly has:

Initially all ribbon groups try size to their InitialState which is by default - Large. If there's not enough space available to place all groups in their initial state, then the layout engine starts shrinking groups to smaller states in the order defined by their priority in descending order - i.e. states with larger priority are shrinked first. If the states of two groups have the same priority then collapsing is done from right to left. By default the priority of all states of all groups is 1. To set the priority of the given group state, you should use the SetStatePriority method of the ribbon group:

Setting Group State Priorities
Copy Code
ribbonGroup.SetStatePriority(ENRibbonGroupState.Medium, 4);
ribbonGroup.SetStatePriority(ENRibbonGroupState.Small, 3);
ribbonGroup.SetStatePriority(ENRibbonGroupState.Collapsed, 2);

The source code above sets the priority of the Medium, Small and Collapsed state of a ribbon group to values more than 1, which means, that this group will be shrinked before the other groups in the selected ribbon tab page

Ribbon Group Layout
The layout of the widgets inside a ribbon group depends on many factors such as whether or not the widgets implement the INRibbonWidget interface, are they placed in a ribbon layout panel, what are their collapse conditions and so on. It is up to you to determine which containers and what settings to use to configure the layout logic of a ribbon group to your taste. You can also set the InitialState of one or more ribbon widgets, so that they start collapsed to that state.
See Also
Send Feedback