Plugin.Maui.NativeCalendar
0.1.7
See the version list below for details.
dotnet add package Plugin.Maui.NativeCalendar --version 0.1.7
NuGet\Install-Package Plugin.Maui.NativeCalendar -Version 0.1.7
<PackageReference Include="Plugin.Maui.NativeCalendar" Version="0.1.7" />
paket add Plugin.Maui.NativeCalendar --version 0.1.7
#r "nuget: Plugin.Maui.NativeCalendar, 0.1.7"
// Install Plugin.Maui.NativeCalendar as a Cake Addin #addin nuget:?package=Plugin.Maui.NativeCalendar&version=0.1.7 // Install Plugin.Maui.NativeCalendar as a Cake Tool #tool nuget:?package=Plugin.Maui.NativeCalendar&version=0.1.7
Plugin.Maui.NativeCalendar
Plugin.Maui.NativeCalendar
provides the ability to implement native calendar functionality in your .NET MAUI app.
Install Plugin
Available on NuGet.
Install with the dotnet CLI: dotnet add package Plugin.Maui.NativeCalendar
, or through the NuGet Package Manager in Visual Studio.
Supported Platforms
Platform | Minimum Version Supported |
---|---|
iOS | 16+ |
Android | 5.0 (API 21) |
API Usage
Plugin.Maui.NativeCalendar
provides the NativeCalendar
class that displays a native calendar view in your .NET MAUI app.
Permissions
iOS
No permissions are needed for iOS.
Android
No permissions are needed for Android.
Dependency Injection
In order to enable the plugin, you need to call the UseNativeCalendar
method in the MauiProgram.cs
file of your .NET MAUI app.
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseNativeCalendar() // <--- Add this line
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
Native Calendar Implementation
You'll need to add a xmlns namespace to your XAML page:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Plugin.Maui.NativeCalendar.Sample.MainPage"
xmlns:nativecalendar="clr-namespace:Plugin.Maui.NativeCalendar;assembly=Plugin.Maui.NativeCalendar"
Title="Native Calendar Plugin">
And then consume your calendar in the XAML page:
<nativecalendar:NativeCalendarView MaximumDate="{Binding MaximumDate}"
MinimumDate="{Binding MinimumDate}"
SelectedDate="{Binding SelectedDate}"
Events="{Binding Events}"
EventIndicatorColor="{Binding EventIndicatorColor}"
HeightRequest="500"
DateChanged="NativeCalendarView_DateChanged" />
Events
ReadingChanged
Occurs when feature reading changes.
Properties
IsSupported
Gets a value indicating whether reading the feature is supported on this device.
IsMonitoring
Gets a value indicating whether the feature is actively being monitored.
Methods
Start()
Start monitoring for changes to the feature.
Stop()
Stop monitoring for changes to the feature.
Acknowledgements
This project could not have came to be without these projects and people, thank you! ❤️
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-android34.0 is compatible. net8.0-ios18.0 is compatible. net8.0-maccatalyst18.0 is compatible. |
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.82)
-
net8.0-ios18.0
- Microsoft.Maui.Controls (>= 8.0.82)
-
net8.0-maccatalyst18.0
- Microsoft.Maui.Controls (>= 8.0.82)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.