Back to Devexpress

PopupMenuShowingEventArgs.MenuType Property

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-menu-dot-popupmenushowingeventargs-2babb3ec.md

latest4.0 KB
Original Source

PopupMenuShowingEventArgs.MenuType Property

Indicates a spreadsheet element for which the context menu is invoked.

Namespace : DevExpress.Xpf.Spreadsheet.Menu

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public SpreadsheetMenuType MenuType { get; }
vb
Public ReadOnly Property MenuType As SpreadsheetMenuType

Property Value

TypeDescription
SpreadsheetMenuType

An enumeration member that specifies the menu type.

|

Available values:

Show 12 items

NameDescription
None

Specifies no menu.

| | ColumnHeading |

Specifies a context menu which can be invoked by right-clicking a column header.

| | RowHeading |

Specifies a context menu which can be invoked by right-clicking a row header.

| | SelectAllButton |

Specifies a context menu which can be invoked by right-clicking the Select All button in the upper-left corner of a worksheet.

| | SheetTab |

Specifies a context menu which can be invoked by right-clicking a worksheet tab.

| | Picture |

Specifies a context menu which can be invoked by right-clicking a picture embedded in a worksheet.

| | Chart |

Specifies a context menu which can be invoked by right-clicking a chart in a worksheet.

| | DrawingObjects |

Specifies a context menu which can be invoked by right-clicking a drawing object when a worksheet contains several drawing objects, such as pictures or charts.

| | Cell |

Specifies a context menu which can be invoked by right-clicking any cell in a worksheet.

| | AutoFilter |

Specifies a context menu which can be invoked by clicking the AutoFilter drop-down arrow.

| | PivotTable |

Specifies a context menu which can be invoked by right-clicking any cell in a pivot table.

| | PivotTableAutoFilter |

Specifies a context menu which can be invoked by clicking the AutoFilter drop-down arrow on the row or column label of a pivot table.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MenuType property.

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.

wpf-spreadsheet-customize-context-menu/CS/MenuCustomization/MainWindow.xaml.cs#L23

csharp
// Check whether this event was raised for a cell popup menu of the Spreadsheet control.
if (e.MenuType == SpreadsheetMenuType.Cell)
{

wpf-spreadsheet-customize-context-menu/VB/MenuCustomization/MainWindow.xaml.vb#L22

vb
' Check whether this event was raised for a cell popup menu of the Spreadsheet control.
If e.MenuType = SpreadsheetMenuType.Cell Then
    ' Remove the "Clear Contents" menu item.

See Also

PopupMenuShowingEventArgs Class

PopupMenuShowingEventArgs Members

DevExpress.Xpf.Spreadsheet.Menu Namespace