Category / Section
How to auto size the days and timeline views in the .NET MAUI Scheduler (SfScheduler)?
1 min read
The MAUI Scheduler allows you to display the calendar days or timeline views that autofit to the screen size when there is no need to scroll the timeslot views or when changing the start or end hour by setting the TimeIntervalWidth property value to -1 for Timeline views and TimeIntervalHeight value to -1 for Day, Week, and Workweek views.
XAML
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WorkHour.MainPage" xmlns:scheduler="clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler"> <scheduler:SfScheduler x:Name="Scheduler" View="TimelineDay" AllowedViews="Day,Week,WorkWeek,TimelineDay,TimelineWeek,TimelineWorkWeek"> <scheduler:SfScheduler.DaysView> <scheduler:SchedulerDaysView StartHour="9" EndHour="18" TimeIntervalHeight="-1"/> </scheduler:SfScheduler.DaysView> <scheduler:SfScheduler.TimelineView> <scheduler:SchedulerTimelineView StartHour="9" EndHour="18" TimeIntervalWidth="-1" /> </scheduler:SfScheduler.TimelineView> </scheduler:SfScheduler> </ContentPage>