We at Syncfusion released the preview version of our WinUI 3 Project Reunion Scheduler in the Views.
Let’s check out these features and learn how to integrate the WinUI 3 Project Reunion Scheduler into an application.
A wide range of built-in view modes are available: day, week, workweek, timeline day, timeline week, timeline workweek, and timeline month.
Render recurring, all-day, and spanned appointments to visualize your schedules and events easily. Appointments contain information on events scheduled at specific times. In addition to default appointments, users can also use their own collections to connect a business entity to an appointment by mapping their fields, such as start time, end time, subject, notes, and recurrence.
You can easily configure recurring events on a daily, weekly, monthly, or yearly basis. You can also skip or change the occurrence of a recurring appointment.
Group appointments based on the resources associated with them in day, week, workweek, timeline day, timeline week, timeline workweek, and timeline month views.
Load appointments on demand for the visible date range with the loading indicator to users. Loading on demand improves the loading performance of appointments ranging multiple months or years.
Display appointments in a list below the month view by clicking a day.
You can easily create, edit, or delete appointments using the built-in appointment editor.
The scheduler context menu displays shortcut options to add, edit, and delete appointments during user interactions such as holding or right-clicking appointments, time slots, and month cells. Use built-in RoutedUICommands to handle the context menu options.
Display appointments created in various time zones in a system. Appointment start and end times are also automatically adjusted and displayed based on daylight savings time.
You can create special time regions to highlight time slots in day, week, workweek, timeline day, timeline week, and timeline workweek views. Adjacent special time regions can be merged and shown as a single region instead of separate regions for each day in week and workweek views.
Customize the workdays in a workweek so that the remaining days will be hidden from the view.
You can also customize the first day of the week as needed. The default first day is Sunday.
Prevent navigation beyond the minimum date and maximum date. This restricts users from selecting dates outside the time range.
You can provide a unique and consistent look to your Scheduler by customizing its appearance using styles, data templates, and themes.
The Scheduler control is available in both light and dark themes.
Display the current date and time in globalized formats. All static text in the Scheduler can be localized.
Now that we’ve seen the features of the WinUI 3 Scheduler control, let’s cover how to add it in your application and use its basic features. You can implement the Scheduler in both WinUI 3 desktop and WinUI 3 UWP applications.
For this example, I am going to use the Scheduler in a WinUI 3 desktop project.
First, create a simple WinUI 3 desktop project using the instructions provided in the following documentations: Get started with WinUI 3 for desktop apps and Build desktop Windows apps with Project Reunion 0.5.
Then, add the Syncfusion.Scheduler.WinUI NuGet package to the application from nuget.org or from the installed location, C:\Program Files (x86)\Syncfusion\Essential Studio®\WinUI\xx.x.x.xx\NuGetPackages.
Note: xx.x.x.xx denotes the version [19.1.0.55-beta] of the Syncfusion WinUI 3 Project Reunion Scheduler package.
Include the scheduler namespace in your XAML file with the following code:
xmlns:scheduler="using:Syncfusion.UI.Xaml.Scheduler"
Initialize the Scheduler control as shown in the following code example.
Xaml
<scheduler:SfScheduler x:Name="Schedule" ViewType="Week"/>
C#
SfScheduler scheduler = new SfScheduler(); this.Content = scheduler;
ScheduleAppointment is a class that defines appointments in the scheduler control. It has some basic properties such as StartTime, EndTime, Subject, and you can add some additional information about the appointment using the Notes, Location, and IsAllDay properties.
Xaml
<Grid> <Grid.DataContext> <local:SchedulerViewModel/> </Grid.DataContext> <scheduler:SfScheduler x:Name="Schedule" ItemsSource="{Binding Events}" ViewType="Week"/> </Grid>
C#
public class SchedulerViewModel { public SchedulerViewModel() { Events = GenerateAppointments(); } public ScheduleAppointmentCollection Events { get; set; } private ScheduleAppointmentCollection GenerateAppointments() { // Creating an instance for the schedule appointment collection. var scheduleAppointmentCollection = new ScheduleAppointmentCollection(); //Adding the schedule appointments in the schedule appointment collection. scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddHours(10), EndTime = DateTime.Now.Date.AddHours(11), Subject = "Client Meeting", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 133, 81, 242)), Foreground = new SolidColorBrush(Colors.White), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(1).AddHours(13), EndTime = DateTime.Now.Date.AddDays(1).AddHours(14), Subject = "GoToMeeting", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 140, 245, 219)), Foreground = new SolidColorBrush(Colors.Black), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(-1).AddHours(9), EndTime = DateTime.Now.Date.AddDays(-1).AddHours(10), Subject = "Generate Report", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 83, 99, 250)), Foreground = new SolidColorBrush(Colors.White), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(2).AddHours(14), EndTime = DateTime.Now.Date.AddDays(2).AddHours(15), Subject = "Generate Report", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 255, 222, 133)), Foreground = new SolidColorBrush(Colors.Black), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(-2).AddHours(4), EndTime = DateTime.Now.Date.AddDays(-2).AddHours(5), Subject = "Plan Execution", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 45, 153, 255)), Foreground = new SolidColorBrush(Colors.White), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(0).AddHours(5), EndTime = DateTime.Now.Date.AddDays(0).AddHours(6), Subject = "Consulting", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 253, 183, 165)), Foreground = new SolidColorBrush(Colors.Black), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(1).AddHours(9), EndTime = DateTime.Now.Date.AddDays(1).AddHours(10), Subject = "Performance Check", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 198, 237, 115)), Foreground = new SolidColorBrush(Colors.Black), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(3).AddHours(17), EndTime = DateTime.Now.Date.AddDays(3).AddHours(18), Subject = "Project Plan", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 253, 185, 222)), Foreground = new SolidColorBrush(Colors.Black), }); scheduleAppointmentCollection.Add(new ScheduleAppointment { StartTime = DateTime.Now.Date.AddDays(0).AddHours(17), EndTime = DateTime.Now.Date.AddDays(0).AddHours(18), Subject = "Consulting", AppointmentBackground = new SolidColorBrush(Color.FromArgb(255, 83, 99, 250)), Foreground = new SolidColorBrush(Colors.White), IsAllDay = true }); return scheduleAppointmentCollection; } }
For more information, refer to our WinUI 3 Project Reunion Scheduler demo project. On executing this sample, you will get the output shown in the following screenshot.
I hope you enjoyed learning about the new Syncfusion WinUI 3 Project Reunion Scheduler control and its features. This control is available in the WinUI Scheduler user guide and our demos in this GitHub repository. Additionally, you can download and check out our demo app in the App Center.
For current Syncfusion customers, the new version is available for download from the License and Downloads page. If you are not yet a Syncfusion customer, you can try our 30-day free trial to check out the newest features.
Also, if you need any specific feature in our WinUI 3 Scheduler, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!