MergingProperties.Name Attached Property
Gets or sets a “merge name”. This is an attached property.
Namespace: DevExpress.Xpf.Bars
Assembly: DevExpress.Xpf.Core.v19.2.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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-specify-target-bar-during-merging-t240807.
<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>