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)