Skip to main content

DefaultSummaryMenuItemNames Class

Contains default item captions displayed within the summary context menu.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.1.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public class DefaultSummaryMenuItemNames

Remarks

Refer to the Localizing WPF Controls via Localizer Objects topic for information on how to change default menu item captions.

Example

The following example removes an item from the Total Summary panel‘s context menu:

Grid - Remove Items from the Context Menu

View Example: Customize the GridControl's Context Menu

In XAML

Add the RemoveBarItemAndLinkAction object to the DataViewBase.TotalSummaryMenuCustomizations collection. Specify the BarItemActionBase.ItemName property with the menu item name from the DefaultSummaryMenuItemNames class.

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

In Code

Handle the DataViewBase.ShowGridMenu event.

<dxg:TableView ShowGridMenu="ShowGridMenu"/>
void ShowGridMenu(object sender, GridMenuEventArgs e) {
    if (e.MenuType == GridMenuType.TotalSummary) {
        e.Customizations.Add(new RemoveAction { ElementName = DefaultSummaryMenuItemNames.Customize });
    }
}

Inheritance

Object
DefaultSummaryMenuItemNames
See Also