Back to Devexpress

RemoveAction Class

wpf-devexpress-dot-xpf-dot-bars-d4abc8fa.md

latest5.2 KB
Original Source

RemoveAction Class

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

Declaration

csharp
public class RemoveAction :
    CollectionAction
vb
Public Class RemoveAction
    Inherits CollectionAction

Remarks

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).

xaml
<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

xml
<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

xml
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Export}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}"/>

reporting-wpf-customize-context-menus-in-report-designer/CS/CustomizeContextMenus/MainWindow.xaml#L10

xml
<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

xml
<!--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

xml
<!--Remove the Insert Comment item from the menu.-->
<dxb:RemoveAction ElementName="{x:Static dxsps:DefaultBarItemNames.PopupMenuItem_InsertComment}" />
<!--Remove the Hyperlink item from the menu.-->

Implements

IControllerAction

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BarManagerControllerActionBase DevExpress.Xpf.Bars.CollectionAction RemoveAction

See Also

RemoveAction Members

Bar Actions

DevExpress.Xpf.Bars Namespace