[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Collapse]Scheduler (legacy)
   [Expand]Overview
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Scheduler Elements
    [Expand]Appointments
     Resources
    [Expand]Views
     Pop-up Menus
    [Expand]Data Binding
    [Expand]Mappings
    [Expand]Supported Formats
    [Expand]Styles and Templates
     Services
     Time Zones
    [Expand]Printing
     Product Class Structure
     Scheduling Basics
   [Expand]Visual Elements
   [Expand]Examples
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Services

Note

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.

A service is exposed to clients as a public interface. A client can only access a service with an interface known in advance. This capability separates the implementation of a feature from the methods used to access this feature. A service enables you to create platform-independent code, and minimize the possibility of breaking changes in future versions.

To access a service, use the SchedulerControl.GetService<T> method.

You can also substitute a service with a custom descendant, by using the SchedulerControl.RemoveService method to remove the default service, and the SchedulerControl.AddService method to add a custom descendant. This technique enables you to modify the control's behavior and customize its appearance.

The following code snippet illustrates the service substitution technique.

This example demonstrates how to display TimeRuler scale captions formatted in a custom manner, so that the TimeRuler for a local time zone uses a 12-hour clock.

The code uses the TimeRulerFormatStringService descendant to substitute the ITimeRulerFormatStringService service. A custom service analyzes the TimeRuler.UseClientTimeZone property, which indicates whether the current TimeRuler displays the local time, and provides the required format string.

The SchedulerControl implements the following services.

Service Description
AppointmentFormatStringService Provides a wrapper for using the IAppointmentFormatStringService interface, enabling you to change time formats used to display appointment start and end times, as well as the string indicating that an appointment extends beyond the visible area.
HeaderCaptionService Provides a wrapper for overriding methods used for custom formatting the header captions in different Scheduler views.
SchedulerStateService Provides a wrapper for using the ISchedulerStateService.
TimeRulerFormatStringService Provides a wrapper for using the ITimeRulerFormatStringService interface, enabling you to change captions displayed in the Time Ruler.
IDateTimeNavigationService Provides properties and methods for time cell navigation.
IResourceNavigationService Provides properties and methods for the resource list navigation.

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