Bar
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

Declaration

[Browsable(false)]
public class RemoveBarItemAndLinkAction :
    RemoveBarItemAction
<Browsable(False)>
Public Class RemoveBarItemAndLinkAction
    Inherits RemoveBarItemAction

Remarks

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:BarManagerActionContainer>
    <dxb:RemoveBarItemAndLinkAction ItemName="btnAbout"/>
    <!--...-->

See Bar Actions to learn more.

Examples

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.

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

Implements

See Also