BarManager.MdiMenuMergeStyle Property
Gets or sets if and when a merge mechanism is invoked in an MDI application.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(BarMdiMenuMergeStyle.Always)]
[DXCategory("Behavior")]
public virtual BarMdiMenuMergeStyle MdiMenuMergeStyle { get; set; }
Property Value
Type | Default | Description |
---|---|---|
BarMdiMenuMergeStyle | Always | A BarMdiMenuMergeStyle value specifying when merge operations should be performed. |
Available values:
Name | Description |
---|---|
Always | The merge mechanism is invoked when a child MDI form is activated. Merge-related toolbars of inactive child forms are hidden from these forms and from the parent form. |
WhenChildActivated | The merge mechanism is invoked when a child MDI form is activated. Merge-related toolbars of inactive child forms are visible in these forms, and are hidden from the parent form. |
OnlyWhenChildMaximized | The merge mechanism is invoked when a child MDI form is maximized. The unmerge mechanism is invoked when a child form is restored from the maximized view. |
Never | The merge mechanism is disabled. |
Remarks
For MDI applications, XtraBars provides merge functionality allowing you to combine the bars of parent and child MDI forms.
The MdiMenuMergeStyle property determines if and when merge and unmerge mechanisms are invoked. By default, the merge mechanism is invoked when a child MDI form is activated. Similarly, when the form becomes inactive, the unmerge mechanism is invoked.
XtraBars support automatic merging/unmerging of main menus. This means that if the parent and child MDI forms have main menus, they will be combined within the parent’s main menu when the merge mechanism is invoked. The merge mechanism also fires the BarManager.Merge event when required and this allows you to merge other bars. To merge two bars belonging to different BarManagers, call the Bar.Merge method.
The unmerge mechanism invokes the BarManager.UnMerge event, which allows you to undo the results of the previous manual merge operation. Call the Bar.UnMerge method for this purpose.
The bar items’ BarItem.MergeType properties determine how items are merged. This specifies whether the new items should be appended to the original items, replace them, etc. Refer to the MDI Merging document for more information.