How to restrict the view navigation on selecting the WinUI Calendar (SfCalendar)
How to restrict the view navigation in the WINUI calendar
In the WINUI Calendar, by default, navigate between the month, year, decade, and century views by tapping the calendar header and date. Restrict the view navigation by using the MinDisplayMode and MaxDisplayMode properties of the calendar.
XAML
<Window x:Class="ViewNavigationRestriction.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:ViewNavigationRestriction" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:calendar="using:Syncfusion.UI.Xaml.Calendar"> <Grid> <calendar:SfCalendar Name="sfCalendar" MinDisplayMode="Month" MaxDisplayMode="Month"/> </Grid> </Window>
