Skip to main content

How to: Customize the Popup Menu

  • 2 minutes to read

#Customize the Popup Menu at Runtime

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.

#Customize the Popup Menu at Design Time

The SchedulerControl provides special properties that allow you to customize its context menus by adding new menu items or removing existing items. These properties return a BarManagerActionCollection object that provides multiple methods, used to manage menu items contained within a popup menu.

Menu Type Description Image Property
Default Popup Menu This menu is shown when an end-user right-clicks time cells that do not contain any appointments. DXScheduler_DefaultPopupMenu SchedulerControl.DefaultMenuCustomizations
Appointment Popup Menu This menu is shown when an end-user right-clicks an appointment. DXScheduler_AppointmentPopupMenu SchedulerControl.AppointmentMenuCustomizations
Time Ruler Popup Menu This menu is shown when an end-user right-clicks an time ruler. DXScheduler_TimeRulerPopupMenu SchedulerControl.TimeRulerMenuCustomizations