Back to Devexpress

ISchedulerCommandFactoryService.CreateCommand(SchedulerCommandId) Method

corelibraries-devexpress-dot-xtrascheduler-dot-services-dot-ischedulercommandfactoryservice-dot-createcommand-x28-devexpress-dot-xtrascheduler-dot-commands-dot-schedulercommandid-x29.md

latest3.8 KB
Original Source

ISchedulerCommandFactoryService.CreateCommand(SchedulerCommandId) Method

Namespace : DevExpress.XtraScheduler.Services

Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
SchedulerCommand CreateCommand(
    SchedulerCommandId id
)
vb
Function CreateCommand(
    id As SchedulerCommandId
) As SchedulerCommand

Parameters

NameType
idDevExpress.XtraScheduler.Commands.SchedulerCommandId

Returns

Type
DevExpress.XtraScheduler.Commands.SchedulerCommand

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateCommand(SchedulerCommandId) method.

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.

winforms-scheduler-replace-default-command/CS/WindowsFormsApplication1/CustomSchedulerCommandFactoryService.cs#L38

csharp
}
    return service.CreateCommand(id);
}

winforms-scheduler-customize-popup-menu/CS/PopupMenuCustomization/Form1.cs#L54

csharp
ISchedulerCommandFactoryService service = schedulerControl1.GetService<ISchedulerCommandFactoryService>();
SchedulerCommand cmd = service.CreateCommand(SchedulerCommandId.SwitchToGroupByResource);
SchedulerMenuItemCommandWinAdapter menuItemCommandAdapter =

winforms-scheduler-replace-default-command/VB/WindowsFormsApplication1/CustomSchedulerCommandFactoryService.vb#L34

vb
End If
    Return service.CreateCommand(id)
End Function

winforms-scheduler-customize-popup-menu/VB/PopupMenuCustomization/Form1.vb#L46

vb
Dim service As ISchedulerCommandFactoryService = schedulerControl1.GetService(Of ISchedulerCommandFactoryService)()
Dim cmd As SchedulerCommand = service.CreateCommand(SchedulerCommandId.SwitchToGroupByResource)
Dim menuItemCommandAdapter As SchedulerMenuItemCommandWinAdapter = New SchedulerMenuItemCommandWinAdapter(cmd)

See Also

ISchedulerCommandFactoryService Interface

ISchedulerCommandFactoryService Members

DevExpress.XtraScheduler.Services Namespace