Skip to main content

How to: Add an Item to the Context Menu (legacy)


You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

This example demonstrates how to add custom menu items to the Appointment Popup Menu of the SchedulerControl using the SchedulerControl.AppointmentMenuCustomizations property in XAML. Add a bar item (BarCheckItem, BarButtonItem or BarItemSeparator class instance) to the collection and specify item properties. To insert an item into a specific position, attach the BarItemLinkActionBase.ItemLinkIndex property.

View Example

<!--Add items to the Appointment popup menu-->
    <dxb:BarItemSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="1" />
    <dxb:BarCheckItem Name="customCheckItem" 
                      Content="BarCheckItem Added in XAML" 
                      CheckedChanged="customCheckItem_CheckedChanged" />
    <dxb:BarButtonItem Name="customButtonItem" 
                       Content="BarButtonItem Added in XAML" 
    <dxb:BarItemSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="4" />
See Also