Skip to main content

RibbonStatusBar.MergeStatusBar(RibbonStatusBar) Method

Merges the specified RibbonStatusBar object into the current RibbonStatusBar object.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public virtual void MergeStatusBar(
    RibbonStatusBar mergedStatusBar


Name Type Description
mergedStatusBar RibbonStatusBar

A RibbonStatusBar object to be merged into the current status bar.


During merging, a RibbonControl of a child MDI form is automatically merged with a Ribbon Control within the parent MDI form. RibbonStatusBar objects of the child and parent MDI forms are not merged automatically. To merge them immediately after the Ribbon Controls have been merged, call the MergeStatusBar method within your RibbonControl.Merge event handler. The RibbonStatusBar.Merge event fires after another RibbonStatusBar object has been merged with the current RibbonStatusBar object.

If RibbonStatusBar objects have been manually merged, they must be manually unmerged via the RibbonStatusBar.UnMergeStatusBar method. To unmerge status bars when the default unmerge mechanism is invoked, call the RibbonStatusBar.UnMergeStatusBar method within your RibbonControl.UnMerge event handler.

The BarItem.MergeType properties of bar items in a main and child MDI forms define how the items behave during merge operations: whether the child form’s items replace the main form’s items, or are simply appended to the parent form’s Ribbon Control/status bar, etc.

See Ribbon Merging to learn more.


The following example shows how to merge RibbonStatusBar objects in an MDI application, when the Ribbon merging mechanism is invoked. It’s assumed that both the parent and child MDI forms contain RibbonStatusBar objects. To merge them, the RibbonStatusBar.MergeStatusBar method is called in a RibbonControl.Merge event handler. To unmerge the status bars, the RibbonStatusBar.UnMerge method is called in a RibbonControl.UnMerge event handler.

using DevExpress.XtraBars.Ribbon;

// Merge Ribbon Controls when a child form is maximized
RibbonControl1.MdiMergeStyle = DevExpress.XtraBars.Ribbon.RibbonMdiMergeStyle.OnlyWhenMaximized;

// Manually merge the status bars of the parent and child MDI forms.
private void RibbonControl1_Merge(object sender, RibbonMergeEventArgs e) {
    RibbonControl parentRRibbon = sender as RibbonControl;
    RibbonControl childRibbon = e.MergedChild;
// Manually unmerge the status bars.
private void RibbonControl1_UnMerge(object sender, RibbonMergeEventArgs e) {
    RibbonControl parentRRibbon = sender as RibbonControl;            
See Also