Getting Started with UWP Calendar
18 Aug 20262 minutes to read
This section explains how to create the SfCalendar control.
Adding SfCalendar Control
Create a Universal Windows Platform project in Visual Studio and refer to the following assemblies.
-
Syncfusion.SfInput.UWP
-
Syncfusion.SfShared.UWP
- Include the namespace for the Syncfusion.SfInput.UWP assembly in MainPage.xaml.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:input="using:Syncfusion.UI.Xaml.Controls.Input">- Now add the SfCalendar control with a required optimal name using the included namespace.
<Page
...
xmlns:input="using:Syncfusion.UI.Xaml.Controls.Input">
<input:SfCalendar x:Name="calendar">
</Page>using Syncfusion.UI.Xaml.Controls.Input;
SfCalendar calendar = new SfCalendar();Imports Syncfusion.UI.Xaml.Controls.Input;
Dim calendar As New SfCalendar()Enabling Navigation Buttons
Set the property ShowNavigationButton to true for enabling the navigation buttons that allow switching between months.
<Page
...
xmlns:input="using:Syncfusion.UI.Xaml.Controls.Input">
<input:SfCalendar x:Name="calendar" ShowNavigationButton="True"/>
</Page>using Syncfusion.UI.Xaml.Controls.Input;
calendar.ShowNavigationButton = true;Imports Syncfusion.UI.Xaml.Controls.Input;
calendar.ShowNavigationButton = True
Culture Support
The month and day names of a region can be displayed in SfCalendar based on the Culture property.
<Page
...
xmlns:input="using:Syncfusion.UI.Xaml.Controls.Input">
<input:SfCalendar x:Name="calendar"/>
</Page>using Syncfusion.UI.Xaml.Controls.Input;
calendar.Culture = new System.Globalization.CultureInfo("fr-FR");Imports Syncfusion.UI.Xaml.Controls.Input;
calendar.Culture = New System.Globalization.CultureInfo("fr-FR")