Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Scheduler Elements
    [Expand]Scheduler Structure
    [Expand]Appointments
     Resources for Appointments
    [Expand]Views
     Pop-up Menus
    [Expand]Data Binding
    [Expand]Mappings
    [Expand]Supported Formats
    [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
    [Expand]Time Zones
     Printing
    [Expand]Scheduler Reporting
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Formatting Services

Different parts of the application may require different formatting, especially for time and dates. A set of services is implemented to facilitate this task regarding the XtraScheduler Suite.

These services are:

Expanded TimeRulerFormatStringService

ITimeRulerFormatStringService interface provides the means to custom format the text of time labels within the Time Ruler. You can override the following methods, substituting the service with its custom descendant:

  • GetHourFormat(TimeRuler ruler)
  • GetHalfDayHourFormat(TimeRuler ruler)
  • GetHourOnlyFormat(TimeRuler ruler)
  • GetTimeDesignatorOnlyFormat(TimeRuler ruler)
  • GetMinutesOnlyFormat(TimeRuler ruler)

These methods should return a format string specifying how to display a corresponding visual element. The location of elements within the time ruler is illustrated below.

TimeSlot.Value is 60 minutes:

TimeSlot.Value is 6 minutes:

For the code sample, which uses the time ruler formatting service, refer to the How to: Display TimeRulers with Different Time Formats Together document.

Expanded HeaderCaptionService

IHeaderCaptionService interface enables you to change the captions of the headers in different views. You can override the corresponding method, substituting the service with its custom descendant. It should return a format string specifying how to display a header in the corresponding view. For the code sample, refer to the How to: Display Custom Day Headers article and the online example Formatting Services - an example of use.

Expanded HeaderToolTipService

IHeaderToolTipService interface allows you to specify custom tooltips for the day headers. You can override the following methods, substituting the service with its custom descendant:

Overridden methods should return a format string specifying how to display a header's tooltip in the corresponding view. The method for using this service is the same as described for the HeaderCaptionService.

Expanded AppointmentFormatStringService

AppointmentFormatStringService class enables you to customize the time display format used in the visual representation of appointments. You can override the following methods, substituting the service with its custom descendant:

Overridden methods should return a format string specifying how to display a day header's tooltip in the corresponding view. The method for using this service is the same as described for the services above. Review the How to: Display Appointments in Military Time for the code sample.

Review the Introduction to Services in XtraScheduler document, for information on implementing services in your application.

Expanded See Also

How would you rate this topic?​​​​​​​