Good Afternoon,
I am using the xamScheduleView to show appointments. The default time slots across the top show as a 12-hour clock, and I would like them to show as a 24-hour clock, for example 2:00 PM would shows as 14:00 instead of 2:00. This would make the times across the top easier to delineate AM from PM. Also I'm hoping the associated appointment will show the same 24-hour clock time.
What would be the best way to accomplish this?
Thanks!
Alicia Kelley
Thanks for the quick reply Andrew! I ended up going with your first option to set the xamScheduleDataManager's DateInfoProvider.
Thanks again!
Alicia
There's two possibilities. First, the control uses the date time information provided by the DateInfoProviderResolved of the XamScheduleDataManager which by default uses a DateInfoProvider that wraps the information provided by the CultureInfo.CurrentCulture. So one option would be to set the XamScheduleDataManager's DateInfoProvider to a DateInfoProvider that wraps a CultureInfo whose date time information uses 24 hour or a derived DateInfoProvider that overrides the DisplayTimeIn24HourFormat and returns true. The other is something I mentioned in this reply. Essentially that element is the ScheduleViewTimeslotHeader element and its template contains a TimeslotHeaderTimePresenter that calculates and creates the elements used to represent the header. You could retemplate the ScheduleViewTimeslotHeader to contain a textblock instead that binds to the StartDate, etc. and renders using whatever format you set up.