How to customize time label of Schedule in Xamarin.Forms application?
Time label customization in schedule
SfSchedule allows you customize the time label text of schedule views.
This article explains you how to customize the time label text of TimeLineView in schedule.
The time label text can be customized for DayView, WeekView, and WorkWeekView using the DayViewSettings, WeekViewSettings, and WorkWeekViewSettings properties, respectively.
Step 1: Initialize an object for TimeLineViewSettings, and assign it to SfSchedule TimeLineViewSettings.
TimelineViewSettings timelineViewSettings = new TimelineViewSettings(); schedule.TimelineViewSettings = timelineViewSettings;
Step 2: Initialize an object for TimeLineLabelSettings, and assign it to SfSchedule TimeLineViewSettings.
TimelineLabelSettings labelSettings = new TimelineLabelSettings(); timelineViewSettings.LabelSettings = labelSettings;
Step 3: Append the required string value with time slot value, and assign it to the TimeFormat property of TimeLineLabelSettings.
labelSettings.TimeFormat = string.Format(" 'Room' ") + " " + "H";
Sample Demo: CustomTimeLabelText
DayView |
WeekView |
WorkWeekView |
TimelineView |
|
|