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.v24.2.dll
NuGet Package: DevExpress.Wpf.Scheduler
Declaration
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>