Professional UI Solutions
Site Map   /  Register

Ribbon Layout

How to select a tab or get a selected tab in the ribbon programmatically?

You can do that using the CurrentTabPage property of the ribbon. For example, to get a selected tab, use the following code:

Elegant.Ui.RibbonTabPage tp = ribbon1.CurrentTabPage;

Dim tp As Elegant.Ui.RibbonTabPage = Ribbon1.CurrentTabPage

How to make controls in a ribbon group collapse into a single column?

Let's consider a typical layout of three adjacent controls in a ribbon group. When they have a large size, they are arranged in a row. When there is not enough space in the ribbon group, we want these controls to collapse simultaneously so that they are stacked in a column. You can achieve the above by using the following properties that every control in the ribbon group has: FlowBreak and LayoutGroupName.

The FlowBreak property when set to true guaranties that the next control gets always collapsed in a new column. In figure below, the FlowBreak should be set for the Import Picture control.

When a group of controls have the same value set in the LayoutGroupName property, that indicates that these controls should collapse simultaneously. In figure below, Clip Art, Smart Art and Chart have the same value set in their LayoutGroupName property so when there is not enough even for one of these controls, they change their visual representation simultaneously to accommodate the new size.

Controls stacked in a column in a ribbon group

If you have any questions, please visit our forum or contact our technical support team at