Category / Section
How to customize the time ruler label in the .NET MAUI Scheduler (SfScheduler) days view and timeline view?
1 min read
In MAUI Scheduler, you can customize the time label by using the TimeRulerTextStyle property of the DaysView and TimelineView in scheduler.
XAML
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TimelabelCustomization.MainPage" BackgroundColor="{DynamicResource SecondaryColor}" xmlns:scheduler="clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler"> <Grid> <scheduler:SfScheduler x:Name="Scheduler" View="Day" AllowedViews="Day,Week,WorkWeek,TimelineDay,TimelineWeek,TimelineWorkWeek"> </scheduler:SfScheduler> </Grid> </ContentPage>
CS
public MainPage() { InitializeComponent(); var timeRulerTextStyle = new SchedulerTextStyle() { TextColor = Colors.Red, FontSize = 10, }; this.Scheduler.DaysView.TimeRulerTextStyle = timeRulerTextStyle; this.Scheduler.TimelineView.TimeRulerTextStyle = timeRulerTextStyle; } }
Day view | TimelineDay view |