Articles in this section

How to switch between Schedule views in WinUI (Calendar)

In the WinUI SfScheduler, switch between the schedule views by using the CellTapped event which will be fired while tapping the schedule cell.

XAML

The Scheduler is defined with the Month view as default view.

<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}">
 
    <Grid>
        <scheduler:SfScheduler x:Name="Schedule" ViewType="Month" CellTapped="Schedule_CellTapped"/>
    </Grid>
</Page>

C#

In CellTapped, on tapping a date on the month cell, view moves to that particular date in day view.

//Event Customization
private void Schedule_CellTapped(object sender, CellTappedEventArgs e)
{
    this.Schedule.ViewType = Syncfusion.UI.Xaml.Scheduler.SchedulerViewType.Day;
}

A picture containing cabinet, white, empty

Description automatically generated

 

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