Skip to main content
A newer version of this page is available. .
Bar

MergingProperties.Name Attached Property

Gets or sets a “merge name”. This is an attached property.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

Returns

Type Description
String

A merge name

Remarks

A regular bar can only be merged to another bar if they have matching captions (the Caption property), or if the Name attached property is set to the same value for these bars.

Tip

A regular bar is ToolBarControl and Bar with the Bar.IsMainMenu and Bar.IsStatusBar properties set to false.

To learn more about merging, see MergingProperties.ElementMergingBehavior.

Example

This example shows how to use the MergingProperties.Name attached property to specify the bars to be merged. In the example, the third bar (MainMenuControl) is merged to the second bar.

<dxb:BarContainerControl>
    <dxb:MainMenuControl dxb:MergingProperties.Name="menu1">
        <dxb:BarButtonItem Content="File"/>
    </dxb:MainMenuControl>
    <dxb:MainMenuControl dxb:MergingProperties.Name="menu2">
        <dxb:BarButtonItem Content="Copy"/>
    </dxb:MainMenuControl>
    <dxb:MainMenuControl dxb:MergingProperties.ElementMergingBehavior="InternalWithExternal"  dxb:MergingProperties.Name="menu2">
        <dxb:BarButtonItem Content="Paste"/>
    </dxb:MainMenuControl>
</dxb:BarContainerControl>
See Also