Skip to main content

SchedulerControl.PopupMenuShowing Event

Occurs before a popup menu is created for the SchedulerControl every time a popup menu is invoked.

Namespace: DevExpress.Xpf.Scheduler

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

#Declaration

public event SchedulerMenuEventHandler PopupMenuShowing

#Event Data

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

Property Description
Customizations Provides access to a collection of customizations of the popup menu, customized via the SchedulerControl.PopupMenuShowing event handler.
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.
Menu Gets the popup menu for which the SchedulerControl.PopupMenuShowing event has been raised.
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 or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

#Remarks

Handle the PopupMenuShowing event to dynamically customize the scheduler control's popup menus at runtime. For example, you can remove existing menu items and/or add new items. Use the SchedulerMenuEventArgs.Menu property to get access to the current popup menu and modify the list of menu items via the SchedulerMenuEventArgs.Customizations collection.

You can also customize the scheduler's default, appointment and time ruler popup menus via the SchedulerControl.DefaultMenuCustomizations, SchedulerControl.AppointmentMenuCustomizations and SchedulerControl.TimeRulerMenuCustomizations properties.

#Examples

This example demonstrates how to customize the SchedulerControl popup menu at runtime. In particular, this sample demonstrates how to remove the default New Recurring Appointment menu item from the Default Popup Menu, and add a custom item instead.

For this, it is necessary to handle the SchedulerControl.PopupMenuShowing event. In this event handler, use the SchedulerMenuEventArgs.Menu property to check whether the event has been raised for the default popup menu and change the SchedulerMenuEventArgs.Customizations collection to modify a list of popup menu items.

See Also