windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-ribboncontrol-ff5dd4e6.md
Provides access to the collapsed ribbon, which is about to appear in a pop-up.
Namespace : DevExpress.XtraBars.Ribbon
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event MinimizedRibbonEventHandler MinimizedRibbonShowing
<DXCategory("Events")>
Public Event MinimizedRibbonShowing As MinimizedRibbonEventHandler
The MinimizedRibbonShowing event's data class is DevExpress.XtraBars.Ribbon.MinimizedRibbonEventArgs.
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 runtime, 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.
When the ribbon is collapsed, only page headers are visible. End users can click a page header to display the corresponding page in a pop-up. See the figure below.
When the collapsed ribbon page is about to be displayed, the MinimizedRibbonShowing event is raised. 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 following code snippet:
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) {
// ...
}
Private Sub ribbonControl1_MinimizedRibbonShowing(sender As Object, e As MinimizedRibbonEventArgs)
AddHandler e.MinimizedRibbon.Paint, AddressOf MinimizedRibbon_Paint
End Sub
Private Sub ribbonControl1_MinimizedRibbonHiding(sender As Object, e As MinimizedRibbonEventArgs)
RemoveHandler e.MinimizedRibbon.Paint, AddressOf MinimizedRibbon_Paint
End Sub
Private Sub MinimizedRibbon_Paint(sender As Object, e As PaintEventArgs)
' ...
End Sub
See Also