wpf-devexpress-dot-xpf-dot-bars-d4abc8fa.md
An action that removes a specific bar or ribbon item from the target item collection.
Namespace : DevExpress.Xpf.Bars
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public class RemoveAction :
CollectionAction
Public Class RemoveAction
Inherits CollectionAction
The following Xaml mark-up illustrates two RemoveAction objects. The first action removes all links to the “Save As” bar item (the ElementName ) property. The second action is more specific and removes the “Editors” page group from the “Designer” page (the ContainerName property).
<dxb:RemoveAction ElementName="{x:Static dxrud:DefaultBarItemNames.SaveAs}" />
<dxb:RemoveAction ContainerName="{x:Static dxrud:DefaultBarItemNames.DesignerPage}"
ElementName="{x:Static dxrud:DefaultBarItemNames.EditorsGroup}" />
See the Bar Actions topic to learn more.
The following code snippets (auto-collected from DevExpress Examples) contain references to the RemoveAction class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
reporting-wpf-report-designer-customize-ribbon-toolbar/CS/MainWindow.xaml#L13
<dxrud:ReportDesigner.RibbonCustomizationActions>
<dxb:RemoveAction ElementName="{x:Static dxrud:DefaultBarItemNames.SaveAs}" />
<dxb:RemoveAction ContainerName="{x:Static dxrud:DefaultBarItemNames.DesignerPage}"
reporting-wpf-documentpreviewcontrol-customize-toolbar/CS/MainWindow.xaml#L26
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Export}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}"/>
<dxrud:ReportDesigner.ContextMenuCustomizationActions>
<dxb:RemoveAction ContainerName="{x:Static dxrud:DefaultContextMenuItemNames.LabelContextMenu}"
ElementName="{x:Static dxrud:DefaultContextMenuItemNames.Cut}"/>
wpf-scheduler-customize-built-in-ribbon-control/CS/SchedulerRibbonExample/MainWindow.xaml#L22
<!--Remove the Window group from the Home tab.-->
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.Groups_Home_Window }" />
<!--Remove the Go to Today item on the Home tab, in the Navigate group.-->
wpf-spreadsheet-customize-context-menu/CS/WpfSpreadsheetMenuCustomization/MainWindow.xaml#L35
<!--Remove the Insert Comment item from the menu.-->
<dxb:RemoveAction ElementName="{x:Static dxsps:DefaultBarItemNames.PopupMenuItem_InsertComment}" />
<!--Remove the Hyperlink item from the menu.-->
Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BarManagerControllerActionBase DevExpress.Xpf.Bars.CollectionAction RemoveAction
See Also