Skip to main content

RibbonControl.MinimizedRibbonShowing Event

Provides access to the collapsed ribbon that is about to be displayed in a pop-up.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

[DXCategory("Events")]
public event MinimizedRibbonEventHandler MinimizedRibbonShowing

Event Data

The MinimizedRibbonShowing event's data class is DevExpress.XtraBars.Ribbon.MinimizedRibbonEventArgs.

Remarks

If the RibbonControl.AllowMinimizeRibbon property is set to true, the ribbon can be collapsed. In code, you can collapse the ribbon using the RibbonControl.Minimized property. At run time, the RibbonControl can be minimized using the ribbon’s Expand/Collapse button (see RibbonControl.ShowExpandCollapseButton) or the corresponding command in the context menu. See the figure below.

RibbonControl_MinimizeRibbon

When the ribbon is collapsed, only page headers are visible. End-users can click on a page header to display the corresponding page in a pop-up. See the figure below.

RibbonControl_ExpandRibbon

When the collapsed ribbon’s page is about to be displayed, the MinimizedRibbonShowing event raises. The MinimizedRibbonEventArgs object, passed to the event handler as a parameter, exposes the MinimizedRibbon property which provides access to the RibbonControl displayed in the pop-up window. You can use this property to specify the ribbon properties and handle its events. For instance, you can subscribe to the RibbonControl.Paint event to handle how the control is drawn. To unsubscribe from events, handle the RibbonControl.MinimizedRibbonHiding event, which is raised before the ribbon is hidden and disposed. See the code snippet below.

private void ribbonControl1_MinimizedRibbonShowing(object sender, MinimizedRibbonEventArgs e) {
    e.MinimizedRibbon.Paint += MinimizedRibbon_Paint;
}

private void ribbonControl1_MinimizedRibbonHiding(object sender, MinimizedRibbonEventArgs e) {
    e.MinimizedRibbon.Paint -= MinimizedRibbon_Paint;
}

void MinimizedRibbon_Paint(object sender, PaintEventArgs e) {
   // ...
}
See Also