A newer version of this page is available. Switch to the current version.

RemoveBarItemAndLinkAction Class

Removes a bar item from the BarManager.Items collection, and removes all links to this bar item from link holders (bars, submenus, menus, etc.).

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v18.2.dll


public class RemoveBarItemAndLinkAction :
Public Class RemoveBarItemAndLinkAction
    Inherits RemoveBarItemAction


A bar item to be removed can be specified via the inherited BarItemActionBase.ItemName or BarItemActionBase.ItemIndex property. The BarItemActionBase.ItemIndex property is in effect if the BarItemActionBase.ItemName property is not set.

    <dxb:RemoveBarItemAndLinkAction ItemName="btnAbout"/>

See Bar Actions to learn more.


The following example demonstrates how to remove a specific item from the context menu, which is shown for the Total Summary panel. For this, the RemoveBarItemAndLinkAction object is added to the DataViewBase.TotalSummaryMenuCustomizations collection, and the name of the bar item is specified by the corresponding field of the DefaultSummaryMenuItemNames class.

    <dxb:RemoveBarItemAndLinkAction ItemName="{x:Static dxg:DefaultSummaryMenuItemNames.Customize}" />


See Also