wpf-devexpress-dot-xpf-dot-pivotgrid-dot-popupmenushowingeventargs-69d5470d.md
Gets what kind of pivot grid element invokes the menu.
Namespace : DevExpress.Xpf.PivotGrid
Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll
NuGet Package : DevExpress.Wpf.PivotGrid
public PivotGridMenuType MenuType { get; }
Public ReadOnly Property MenuType As PivotGridMenuType
| Type | Description |
|---|---|
| PivotGridMenuType |
A PivotGridMenuType enumeration value that identifies the context menu type.
|
Available values:
| Name | Description |
|---|---|
| HeadersArea |
| | Header |
| | FieldValue |
| | FilterPopup |
Filter popup context menu.
| | None |
No menu.
| | Cell |
Cell context menu.
|
Use the MenuType property to determine for what kind of pivot grid element (a cell, a field value, a field header or the field header area) the menu is invoked. To obtain the actual visual element, use the PopupMenuShowingEventArgs.TargetElement property.
To learn more, see Context Menus.
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-pivot-grid-change-summary-display-type/CS/HeaderMenuCustomizationExample/HeaderMenuHelper.cs#L55
static void pivotGrid_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e) {
if (e.MenuType == PivotGridMenuType.Header) {
PivotGridControl pivot = (PivotGridControl)sender;
wpf-pivot-grid-change-summary-display-type/VB/HeaderMenuCustomizationExample/HeaderMenuHelper.vb#L50
Private Shared Sub pivotGrid_PopupMenuShowing(ByVal sender As Object, ByVal e As PopupMenuShowingEventArgs)
If e.MenuType = PivotGridMenuType.Header Then
Dim pivot As PivotGridControl = CType(sender, PivotGridControl)
See Also
PopupMenuShowingEventArgs Class