[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Collapse]Scheduler
   [Expand]Getting Started
   [Expand]Appointments
    Resources
    Reminders
   [Expand]Views
   [Collapse]Visual Elements
     Resource Tree
     Ribbon
     Date Navigation Panel
     Pop-Up Menus
     All-Day Area
    [Expand]Windows
     Appointment Flyout
   [Expand]Styles and Templates
   [Expand]Design-Time Features
    Time Zones
   [Expand]Data Binding
    Appearance Customization
    Grouping
    Selecting
    Clipboard Operations
    Printing Templates
    Drag and Drop Customization
    Navigating
    Printing
    End-User Restrictions
   [Expand]Examples
    Migration Guidelines
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Pop-Up Menus

The SchedulerControl is provided with four context menu types that enable an end-user to manage appointments, switch views and dates and adjust time ruler settings. You can customize any type of a context menu by adding or removing items, or replace the default menu with a custom one.

The built-in context menu item names are contained in the static DefaultBarItemNames (see DefaultBarItemNames) class. Commands that these items execute are available from the SchedulerCommands (see SchedulerCommands) class. An instance of this class used by the SchedulerControl is available from its Commands (see SchedulerControl.Commands) property. The list below describes available menu types with their items, related SchedulerCommands, the DefaultBarItemNames properties used to access the menu items and API used to customize these menus.

Expanded Pop-Up Menu Types

Cell Pop-Up Menu

Appears when right-clicking an empty time cell.

SchedulerCommands and Menu API

DefaultBarItemNames properties

ShowNewAppointmentWindowCommand (see SchedulerCommands.ShowNewAppointmentWindowCommand)

ShowNewAllDayAppointmentWindowCommand (see SchedulerCommands.ShowNewAllDayAppointmentWindowCommand)

ShowNewRecurringAppointmentWindowCommand (see SchedulerCommands.ShowNewRecurringAppointmentWindowCommand)

ShowNewRecurringAllDayAppointmentWindowCommand (see SchedulerCommands.ShowNewRecurringAllDayAppointmentWindowCommand)

GoToTodayCommand (see SchedulerCommands.GoToTodayCommand)

GoToDateCommand (see SchedulerCommands.GoToDateCommand)

ChangeTimeScaleCommand (see SchedulerCommands.ChangeTimeScaleCommand)

<br />

SwitchViewCommand (see SchedulerCommands.SwitchViewCommand)

PasteFromClipboardCommand (see SchedulerCommands.PasteFromClipboardCommand)

ContextMenu_Items_Cell_Actions_NewAppointment (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewAppointment)

ContextMenu_Items_Cell_Actions_NewAllDayEvent (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewAllDayEvent)

ContextMenu_Items_Cell_Actions_NewRecurringAppointment (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewRecurringAppointment)

ContextMenu_Items_Cell_Actions_NewRecurringEvent (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewRecurringEvent)

ContextMenu_Items_Cell_Actions_GotoToday (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_GotoToday)

ContextMenu_Items_Cell_Actions_GotoDate (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_GotoDate)

ContextMenu_Items_Cell_Actions_TimeScales (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_TimeScales)

ContextMenu_Items_Cell_Actions_TimeScaleCaptions (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_TimeScaleCaptions)

ContextMenu_Items_Cell_Actions_SwitchView (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_SwitchView)

ContextMenu_Items_Cell_Actions_Paste (see DefaultBarItemNames.ContextMenu_Items_Cell_Actions_Paste)

OptionsContextMenu.CellContextMenu

OptionsContextMenu.CellContextMenuActions

Appointment Pop-Up Menu

Appears when right-clicking an appointment.

SchedulerCommands and Menu API

DefaultBarItemNames properties

ShowAppointmentWindowCommand (see SchedulerCommands.ShowAppointmentWindowCommand)

ShowEditRecurrencePatternWindowCommand (see SchedulerCommands.ShowEditRecurrencePatternWindowCommand)

RestoreOccurrenceCommand (see SchedulerCommands.RestoreOccurrenceCommand)

ChangeStatusCommand (see SchedulerCommands.ChangeStatusCommand)

ChangeLabelCommand (see SchedulerCommands.ChangeLabelCommand)

CutToClipboardCommand (see SchedulerCommands.CutToClipboardCommand)

CopyToClipboardCommand (see SchedulerCommands.CopyToClipboardCommand)

PasteFromClipboardCommand (see SchedulerCommands.PasteFromClipboardCommand)

DeleteAppointmentCommand (see SchedulerCommands.DeleteAppointmentCommand)

ContextMenu_Items_Appointment_Actions_Open (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Open)

ContextMenu_Items_Appointment_Actions_EditSeries (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_EditSeries)

ContextMenu_Items_Appointment_Actions_RestoreOccurrence (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_RestoreOccurrence)

ContextMenu_Items_Appointment_Options_ShowTimeAs (see DefaultBarItemNames.ContextMenu_Items_Appointment_Options_ShowTimeAs)

ContextMenu_Items_Appointment_Options_LabelAs (see DefaultBarItemNames.ContextMenu_Items_Appointment_Options_LabelAs)

ContextMenu_Items_Appointment_Actions_Cut (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Cut)

ContextMenu_Items_Appointment_Actions_Copy (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Copy)

ContextMenu_Items_Appointment_Actions_Paste (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Paste)

ContextMenu_Items_Appointment_Actions_Delete (see DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Delete)

OptionsContextMenu.AppointmentContextMenu

OptionsContextMenu.AppointmentContextMenuActions

Appointment Drag Pop-Up Menu

Appears when dragging an appointment with the right mouse button.

SchedulerCommands and Menu API

DefaultBarItemNames properties

MoveAppointmentsOnDropCommand (see SchedulerCommands.MoveAppointmentsOnDropCommand)

CopyAppointmentsOnDropCommand (see SchedulerCommands.CopyAppointmentsOnDropCommand)

CancelDropAppointmentsCommand (see SchedulerCommands.CancelDropAppointmentsCommand)

ContextMenu_Items_AppointmentDrop_Actions_MoveAppointmentsOnDrop (see DefaultBarItemNames.ContextMenu_Items_AppointmentDrop_Actions_MoveAppointmentsOnDrop)

ContextMenu_Items_AppointmentDrop_Actions_CopyAppointmentsOnDrop (see DefaultBarItemNames.ContextMenu_Items_AppointmentDrop_Actions_CopyAppointmentsOnDrop)

ContextMenu_Items_AppointmentDrop_Actions_CancelDropAppointments (see DefaultBarItemNames.ContextMenu_Items_AppointmentDrop_Actions_CancelDropAppointments)

OptionsContextMenu.AppointmentDropContextMenu

OptionsContextMenu.AppointmentDropContextMenuActions

Time Ruler Pop-Up Menu

Appears when right-clicking a time ruler.

SchedulerCommands and Menu API

DefaultBarItemNames properties

ShowNewAppointmentWindowCommand (see SchedulerCommands.ShowNewAppointmentWindowCommand)

ShowNewAllDayAppointmentWindowCommand (see SchedulerCommands.ShowNewAllDayAppointmentWindowCommand)

ShowNewRecurringAppointmentWindowCommand (see SchedulerCommands.ShowNewRecurringAppointmentWindowCommand)

ShowNewRecurringAllDayAppointmentWindowCommand (see SchedulerCommands.ShowNewRecurringAllDayAppointmentWindowCommand)

SwitchViewCommand (see SchedulerCommands.SwitchViewCommand)

CustomizeTimeRulerCommand (see SchedulerCommands.CustomizeTimeRulerCommand)

ChangeTimeScaleCommand (see SchedulerCommands.ChangeTimeScaleCommand)

ContextMenu_Items_TimeRuler_Actions_NewAppointment (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_NewAppointment)

ContextMenu_Items_TimeRuler_Actions_NewAllDayEvent (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_NewAllDayEvent)

ContextMenu_Items_TimeRuler_Actions_NewRecurringAppointment (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_NewRecurringAppointment)

ContextMenu_Items_TimeRuler_Actions_NewRecurringEvent (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_NewRecurringEvent)

ContextMenu_Items_TimeRuler_Actions_SwitchView (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_SwitchView)

ContextMenu_Items_TimeRuler_Actions_CustomizeTimeRuler (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_CustomizeTimeRuler)

ContextMenu_Items_TimeRuler_Actions_SwitchTimeScale (see DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_SwitchTimeScale)

OptionsContextMenu.TimeRulerContextMenu

OptionsContextMenu.TimeRulerContextMenuActions

Expanded Customize Context Menus Dynamically

Handle the SchedulerControl.PopupMenuShowing event to customize popup menus at runtime. Use the Menu (see PopupMenuShowingEventArgs.Menu) property to obtain the current pop-up menu. The MenuType (see PopupMenuShowingEventArgs.MenuType) property provides information about the current menu type (appointment, time cell, time ruler or appointment drop). See the example below.

Expanded Specify Customization Actions

Tip

Use the scheduler's Smart Tag to generate a default context menu for appointments, time rulers or time cells in design-time, and customize it as required. Refer to the Create Context Menu topic for details.

  • Add a New Item

    The OptionsContextMenu class provides options that allow you to customize context menus. Use the *ContextMenuActions property to access the target context menu's actions collection. Add an InsertAction to the retrieved collection to add a new item to the context menu. The following code sample inserts two new items to the appointment context menu.

    As a result, the menu appears as follows.

  • Update an Existing Item

    Obtain the context menu's action collection and add an UpdateAction to it to update any existing context menu item, as shown in the code sample below.

    The image shows the code execution result.

  • Remove the Item

    Add a RemoveAction to the menu's action collection to delete any item from the target context menu. The code snippet shows how to delete an item from the appointment drop context menu.

    The resulting context menu is shown on the image below.

Expanded Create a Custom Context Menu

The OptionsContextMenu.*ContextMenu properties allow you to provide a custom context menu instead of the default one. The code sample below shows how to provide a custom cell pop-up menu shown in the image.

Expanded See Also

Is this topic helpful?​​​​​​​