Example E507
Visible to All Users

WinForms Scheduler - Formatting services

The WinForms scheduler control implements a set of services that make common tasks easier to implement (such as navigation, selection, formatting, keyboard and mouse event handling, etc.).

This example demonstrates formatting services:

C#
private void checkButton1_CheckedChanged(object sender, EventArgs e) { if (checkButton1.Checked) { schedulerControl1.RemoveService(typeof(IAppointmentFormatStringService)); schedulerControl1.AddService(typeof(IAppointmentFormatStringService), customAppointmentFormatStringService); schedulerControl1.RemoveService(typeof(ITimeRulerFormatStringService)); schedulerControl1.AddService(typeof(ITimeRulerFormatStringService), customTimeRulerFormatStringService); schedulerControl1.RemoveService(typeof(IHeaderCaptionService)); schedulerControl1.AddService(typeof(IHeaderCaptionService), customHeaderCaptionService); schedulerControl1.RemoveService(typeof(IHeaderToolTipService)); schedulerControl1.AddService(typeof(IHeaderToolTipService), customHeaderToolTipService); schedulerControl1.ActiveView.LayoutChanged(); } else { schedulerControl1.RemoveService(typeof(IAppointmentFormatStringService)); schedulerControl1.AddService(typeof(IAppointmentFormatStringService), prevAppointmentFormatStringService); schedulerControl1.RemoveService(typeof(ITimeRulerFormatStringService)); schedulerControl1.AddService(typeof(ITimeRulerFormatStringService), prevTimeRulerFormatStringService); schedulerControl1.RemoveService(typeof(IHeaderCaptionService)); schedulerControl1.AddService(typeof(IHeaderCaptionService), prevHeaderCaptionService); schedulerControl1.RemoveService(typeof(IHeaderToolTipService)); schedulerControl1.AddService(typeof(IHeaderToolTipService), prevHeaderToolTipService); schedulerControl1.ActiveView.LayoutChanged(); } }

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.