Articles in this section
Category / Section

How to create WinUI Scheduler (Calendar)

4 mins read

The WinUI Scheduler (SfScheduler) control is used to schedule and manage appointments through an intuitive user interface like the Windows calendar. It supports eight different views: Day, week, workweek, month, timeline day, timeline week, timeline workweek, and timeline month.

1. Create a WinUI 3 desktop app for C# and .NET 5 or WinUI 3 app in UWP for C#.

2. Add a reference to the Syncfusion.Scheduler.WinUI NuGet.

3. Import the control namespace Syncfusion.UI.Xaml.Scheduler in XAML or C# code.

4. Initialize the WinUI Scheduler control.

XAML

<Page
    x:Class="SchedulerWinUI.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SchedulerWinUI"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:scheduler="using:Syncfusion.UI.Xaml.Scheduler"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
 
    <Page.DataContext>
        <local:SchedulerViewModel/>
    </Page.DataContext>
    
    <Grid>
        <scheduler:SfScheduler x:Name="Schedule" ItemsSource="{Binding Events}" ViewType="Month"/>
    </Grid>
</Page>

C#

using Syncfusion.UI.Xaml.Scheduler;
 
namespace GettingStarted
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
            SfScheduler scheduler = new SfScheduler();
            this.Content = scheduler;
        }
    }
}

View sample in GitHub

Focus

Take a moment to peruse the WinUI Scheduler – Getting Started documentation, where you can find about the WinUI Scheduler (SfScheduler) with code examples.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied