Skip to main content

BarItem.MergeOrder Property

Defines the visual position of the bar item after merging bars on a parent MDI form.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public int MergeOrder { get; set; }

Property Value

Type Default Description
Int32 0

An ordinal number determining the position of the bar item after merging bars on a parent MDI form.


For MDI applications, XtraBars implements the merging mechanism that allows the bars of the parent and currently active MDI child forms to be combined. The BarManager.MdiMenuMergeStyle property specifies when this mechanism should be invoked (when a child MDI form is activated, when the form is maximized or never).

During merging, you can specify whether the bar items of a child form’s bar should be added to the parent form’s bar (this is the default behavior), should replace items on the parent form’s bar with identical captions, should simply be removed from a bar or should not be considered at all. Use the BarItem.MergeType properties to specify these settings.

When adding items during a merge operation, the original items of a parent MDI form and the new items of a child form are arranged according to their MergeOrder property values. Items with the lowest MergeOrder come first. The last items will be those that have the greatest MergeOrder value.

If a parent form’s bar has items with MergeOrder equal to the MergeOrder of a child form’s bar item, then the child form’s item will be placed after all the parent form’s matching items.

Refer to the MDI Merging document for more information.

See Also