Adds the subitems of the specified container item to the current container item.
public void Merge( BarLinkContainerItem item )
Public Sub Merge( item As BarLinkContainerItem )
A container item whose subitems are added to the current container item. The types of the two container items should be identical. In addition, the container items must belong to different BarManagers.
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. Other bars can be combined only manually by handling the Merge event.
The merging mechanism invokes the Merge event according to the BarManager.MdiMenuMergeStyle property of the parent form's BarManager.
To merge bars via the Merge event, use the Bar.Merge method.
If the bars being merged have container items (submenus, for instance) this method will try to merge them as well. Two container items will be merged if the following conditions are met:
- the container items' types match
- they have identical captions (see the BarItem.Caption property)
- they both have the BarItem.MergeType property set to BarMenuMerge.MergeItems
The original and acquired subitems are arranged within the container item according to their BarItem.MergeOrder property values.
The BarLinkContainerItem.UnMerge method restores the original item layout for the container item after a merging operation.
If bar items are created at design time and the Merge method should be called when the form is being loaded, the BarManager.ForceInitialize method must be called beforehand.
See the MDI Merging topic for more information.