How to auto size days and timeline views in the .NET MAUI Scheduler (SfScheduler)?
The .NET MAUI Scheduler enables you to automatically fit calendar days or timeline views to the screen size, removing the need for scrolling through timeslot views. This is done by setting the TimeIntervalWidth to -1 for Timeline views and the TimeIntervalHeight to -1 for Day, Week, and Workweek views. This functionality is particularly useful when configuring the start and end hours.
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>
Output
Conclusion
I hope you enjoyed learning how to enable auto-sizing for days and timeline views in the .NET MAUI Scheduler, facilitating a seamless and scroll-free user experience.
Refer to our .NET MAUI Scheduler feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Scheduler documentation to understand how to present and manipulate data.
For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI Scheduler and other .NET MAUI components.
Please let us know in the following comments section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!