Time Regions in .NET MAUI Scheduler—An Overview
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (173).NET Core  (29).NET MAUI  (203)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (211)BoldSign  (13)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (65)Flutter  (132)JavaScript  (219)Microsoft  (118)PDF  (81)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (897)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (50)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (127)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (618)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (39)Extensions  (22)File Manager  (6)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (501)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (42)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (381)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (17)Web  (582)What's new  (323)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Time Regions in .NET MAUI Scheduler—An Overview

Time Regions in .NET MAUI Scheduler—An Overview

Time regions are specific units of time used to define periods or durations. The .NET MAUI Scheduler supports customizing time regions. This customization includes adjusting the duration of time regions, setting specific start and end times, handling interactions in time regions, and defining recurring time regions.

By having their time regions customized, schedulers become more efficient and tailored to individual needs. For instance, in a doctor’s scheduling application, time regions can be customized to account for lunch and break times, which can prevent appointment scheduling during those times. This customization is essential to ensure there are no conflicts between appointments and that sufficient time is allocated for rest and meals.

Time regions in .NET MAUI Scheduler
Time regions in .NET MAUI Scheduler

Note: If you are new to this control, refer to the .NET MAUI Scheduler getting started documentation before proceeding.

This blog will show you how to create and customize time regions in the .NET MAUI Scheduler control.

Defining the time region

Defining the time region requires the essential details in the following table.

Customization options

Summary

StartTime

Customize the time region start date and time.

EndTime

Customize the time region end date and time.

Background

Customize the time region background color.

Text

Customize the text rendered in the time region.

TextStyle

Customize the style for the time region text.

Interaction restriction on a time region

In the .NET MAUI Scheduler, the SchedulerTimeRegion class supports controlling, enabling, or disabling touch interaction for a time region using the EnablePointerInteraction property. It prevents touch interaction on disabled time slots.

Time region globalization

The time region feature provides globalization support, enabling users to customize time regions to align with different time zones or regional conventions using the TimeZone property. This can reduce errors when working across different time zones.

Recurring time region

The time region feature provides recurrence support to repeat the same time region on a regular or periodic interval using RecurrenceRule. For example, you can schedule a daily lunch break for a doctor’s appointment scheduling system.

For more details about the recurrence rule, refer to the recurrence rule documentation.

The recurring exception is an advanced feature of time region recurrence that allows the exclusion of specific occurrences of a recurring time region by using the RecurrenceExceptionDates property in the SchedulerTimeRegion class. This feature is useful when a regular schedule needs to be altered on a particular day or for a particular period, such as holidays or planned maintenance.

Resource-based time region

The time region feature provides resource support to create customized time slots based on specific resources or assets using the ResourceIds property. A resource-based time region defines the availability of those resources for scheduling.

Applying the time regions to .NET MAUI Scheduler

The .NET MAUI Scheduler uses the TimeRegions property in the SchedulerTimeSlotView class to customize the timeslots based on specified time regions and their properties such as StartTime, EndTime, Text, Background, and TimeZone.

SfScheduler scheduler = new SfScheduler();
scheduler.View = SchedulerView.Week;
ObservableCollection<SchedulerTimeRegion> timeRegions = new ObservableCollection<SchedulerTimeRegion>();

//// Adding time region in the scheduler time region collection.
timeRegions.Add(new SchedulerTimeRegion()
{
        StartTime = DateTime.Today.Date.AddHours(13),
        EndTime = DateTime.Today.Date.AddHours(14),
        Text = "Lunch",
        EnablePointerInteraction = false,
        RecurrenceRule = "FREQ=DAILY;INTERVAL=1",
});

//// Assigning the scheduler time region collection to the TimeRegions in DayView of .NET MAUI Scheduler.
scheduler.DaysView.TimeRegions = timeRegions;
this.Content = scheduler;
Daily recurrence time region in .NET MAUI Scheduler
Daily recurrence time region in .NET MAUI Scheduler

Conclusion

Thank you for your time! This blog post showed you how to create and set a time region in the .NET MAUI Scheduler. You can explore other features in the Scheduler control in its documentation.

If you are not a Syncfusion customer, try our 30-day free trial to see how our components can enhance your projects.

Please try the samples available in our .NET MAUI sample location and share your feedback or ask questions in the comments section. Or contact us through our support forum, support portal, or feedback portal. We are happy to assist you!

Test Flight
App Center Badge
Google Play Store Badge
Microsoft Badge
Github Store Badge

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed