[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
    Getting Started
   [Expand]Scheduler Elements and Structure
   [Expand]Data Binding
   [Expand]Appointments
   [Expand]Views
   [Expand]Supported Formats
    Printing
   [Expand]Scheduler Reporting
   [Expand]Time Zones
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
   [Collapse]Services
     Introduction to Services in XtraScheduler
     Keyboard Services
     Mouse Services
     DateTime Navigation Services
     Resource Navigation Services
     Scheduler State Service
     Formatting Services
     Appointment Selection Service
     Selection Service
     Command Factory Service
   [Expand]Member Tables
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Command Factory Service

The ISchedulerCommandFactoryService service allows you to replace default Scheduler commands inside the Bar and Ribbon UI.

  1. Create a custom command class inherited from the default Scheduler command you want to replace. The Default Scheduler commands are stored in the DevExpress.XtraScheduler.Commands namespace. In the sample code below, a custom command derives from the SplitAppointmentOperationCommand class.

  2. Create a custom class that implements the ISchedulerCommandFactoryService interface. This interface exposes the ISchedulerCommandFactoryService.CreateCommand method you should implement. This method identifies commands by IDs and initializes the corresponding command instances.

  3. Call the RichEditControl.RemoveService method to remove the default service from the SchedulerControl.Services collection, and use the SchedulerControl.AddService method to add the replacement service.

Is this topic helpful?​​​​​​​