Skip to main content

PivotGridControl.PopupMenuShowing Event

Allows you to customize context menus.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

public event PopupMenuShowingEventHandler PopupMenuShowing

#Event Data

The PopupMenuShowing event's handler receives an argument of the PopupMenuShowingEventArgs type. The following properties provide information specific to this event:

Property Description
Customizations Allows you to customize the context menu by adding new menu items or removing existing items.
Handled Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
Items Gets a collection of items contained within the context menu.
MenuType Gets what kind of pivot grid element invokes the menu.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
Source Gets the PivotGridControl that raised the event.
TargetElement Gets the UI element for which the context menu is shown.

#Remarks

The PopupMenuShowing event is raised when an end-user invokes a context menu.

Use the event parameter's PopupMenuShowingEventArgs.Customizations property to add new and remove existing menu items. This property provides access to a collection of actions that allow you to customize the context menu. To learn more, see Context Menus, Items and Links and Customizing Bars via Actions.

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, use the PopupMenuShowingEventArgs.MenuType property. To obtain the actual visual element for which the menu is invoked, use the PopupMenuShowingEventArgs.TargetElement property.

Use the following methods to obtain additional information about this visual element.

PopupMenuShowingEventArgs.GetCellInfo

Returns information about the cell for which the menu is invoked.

PopupMenuShowingEventArgs.GetFieldValueInfo

Returns information about the field value for which the menu is invoked.

PopupMenuShowingEventArgs.GetFieldInfo

Returns information about the field for whose header the menu is invoked.

See Also