Back to Devexpress

SchedulerControl.Commands Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-80b6d93e.md

latest3.9 KB
Original Source

SchedulerControl.Commands Property

Gets or sets the commands for the SchedulerControl. This is a dependency property.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
[Browsable(false)]
public SchedulerCommands Commands { get; set; }
vb
<Browsable(False)>
Public Property Commands As SchedulerCommands

Property Value

TypeDescription
SchedulerCommands

A SchedulerCommands object representing the scheduler commands.

|

Remarks

You can rearrange built-in command set or substitute default commands with your own using the Commands property.

Example

This code substitutes the SchedulerCommands.NavigateViewBackwardCommand, SchedulerCommands.NavigateViewForwardCommand, SchedulerCommands.GoToDateCommand and SchedulerCommands.GoToTodayCommand command execution with the methods defined in the ViewModel using the DXCommand binding tool.

View Example

xaml
<dxsch:SchedulerControl.Commands>
    <dxsch:SchedulerCommands GoToDateCommand="{DXCommand Execute='MyGoToDate(@e(scheduler))'}"
        GoToTodayCommand="{DXCommand Execute='MyGoToToday(@e(scheduler))'}"
        NavigateViewBackwardCommand="{DXCommand Execute='MyNavigateBackward(@e(scheduler))'}"
        NavigateViewForwardCommand="{DXCommand Execute='MyNavigateForward(@e(scheduler))'}" />
</dxsch:SchedulerControl.Commands>

The following code snippets (auto-collected from DevExpress Examples) contain references to the Commands 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.

wpf-scheduler-hide-non-working-days-in-day-view/CS/NavigateCommandExample/MainWindow.xaml#L74

xml
<!--region #SchedulerControlCommands-->
<dxsch:SchedulerControl.Commands>
    <dxsch:SchedulerCommands GoToDateCommand="{DXCommand Execute='MyGoToDate(@e(scheduler))'}"

wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml#L52

xml
DayCount="2"/>
<dxsch:SchedulerControl.Commands>
    <dxsch:SchedulerCommands x:Name="schedulerCommands"/>

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.Xpf.Scheduling Namespace