The following code implements a custom schedule title
Public classCustomheadercaptionservice:headercaptionservicewrapper { PublicCustomheadercaptionservice (iheadercaptionservice service):Base(service) {} Public Override stringgetdaycolumnheadercaption (dayheader header) {DateTime date=header. Interval.Start.Date; return string. Format ("{0:m} ({1})", date, date. Dayofweek.tostring (). Getres ()); } }
Services that implement custom schedule headers also need to add services to the Xtrascheduler service
Iheadercaptionservice Headercaptionservice = (iheadercaptionservice) scmain.getservice (typeof( Iheadercaptionservice)); if NULL ) { new customheadercaptionservice (headercaptionservice); Scmain.removeservice (typeof(Iheadercaptionservice)); Scmain.addservice (typeof(Iheadercaptionservice), customheadercaptionservice); }
Xtrascheduler Day Program displays custom titles