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

SchedulerControl.DefaultMenuCustomizations Property

Allows you to customize a default popup menu of the SchedulerControl by adding new menu items or removing existing items.

Namespace: DevExpress.Xpf.Scheduler

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

Declaration

public BarManagerActionCollection DefaultMenuCustomizations { get; }

Property Value

Type Description
BarManagerActionCollection

A BarManagerActionCollection object.

Remarks

Important

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.

Use the DefaultMenuCustomizations property to modify the Scheduler control default popup menu, invoked when the view’s time cells without appointments are right-clicked.

The default popup menu can also be customized via the SchedulerControl.PopupMenuShowing event.

Example

This example demonstrates how to remove a specific item from the Default Popup Menu of the SchedulerControl using the SchedulerControl.DefaultMenuCustomizations property. Add the RemoveBarItemAndLinkAction class instance to the customizations collection, and specify the name of the bar item to delete.

<!--Add items to the Default popup menu-->
<dxsch:SchedulerControl.DefaultMenuCustomizations>
    <dxb:RemoveBarItemAndLinkAction ItemName="{x:Static local:SchedulerMenuItemName.NewAppointment}" />
    <dxb:RemoveBarItemAndLinkAction ItemName="{x:Static local:SchedulerMenuItemName.NewRecurringAppointment}" />
    <dxb:BarItemSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="1" />
    <dxb:BarButtonItem Name="customNavBackItem" 
                      Content="Navigate View Backward" 
                      dxb:BarItemLinkActionBase.ItemLinkIndex="2"
                       CommandParameter="{Binding ElementName=schedulerControl1}" 
                       Command="{Binding NavigateViewBackward, Mode=OneTime, Source={StaticResource commands}}"/>
    <dxb:BarItemSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="3" />
</dxsch:SchedulerControl.DefaultMenuCustomizations>

The following code snippets (auto-collected from DevExpress Examples) contain references to the DefaultMenuCustomizations property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also