Skip to main content
A newer version of this page is available. .

SchedulerControl.PrepareContextMenu Event


You should use the 'PopupMenuShowing' instead

This member is obsolete. Handle the SchedulerControl.PopupMenuShowing event instead.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.1.dll


[Obsolete("You should use the 'PopupMenuShowing' instead", false)]
public event PrepareContextMenuEventHandler PrepareContextMenu

Event Data

The PrepareContextMenu event's data class is PrepareContextMenuEventArgs. The following properties provide information specific to this event:

Property Description
Menu Gets or sets the popup (context) menu for which this event was raised. Inherited from PopupMenuShowingEventArgs.


This example demonstrates how to customize the SchedulerControl‘s popup menus (the SchedulerMenuItemId.DefaultMenu in this case). To change particular items in a popup menu handle the SchedulerControl.PopupMenuShowing event of a Scheduler Control.

using DevExpress.XtraScheduler;
// ...

private void schedulerControl1_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)

    // Check if it's the default menu of a Scheduler.
    if (e.Menu.Id == SchedulerMenuItemId.DefaultMenu)

        // Disable the "New Recurring Appointment" menu item.

        // Hide the "New Recurring Event" menu item.

        // Enable the "Go To Today" menu item.

        // Find the "New Appointment" menu item and rename it.
        SchedulerMenuItem item = e.Menu.GetMenuItemById(SchedulerMenuItemId.NewAppointment);
        if (item != null) item.Caption = "&New Event";
    // Check if it's the appointment menu.
    if(e.Menu.Id == SchedulerMenuItemId.AppointmentMenu) {
See Also