Skip to content

About

A simple demonstration on how to use the XCalendar plugin for .NET, Xamarin Forms, and .NET MAUI.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

Basic Usage

.NET

Install the NuGet package

Now you can use the Calendar

public Calendar MyCalendar { get; set; } = new Calendar();

Xamarin Forms

Install the NuGet package

Create a Calendar in your ViewModel

public Calendar MyCalendar { get; set; } = new Calendar();

Add the following xmlns to your page or view

xmlns:xc="clr-namespace:XCalendar.Forms.Views;assembly=XCalendar.Forms"

Bind to the properties of your Calendar

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    x:Class="App1.MainPage"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:xc="clr-namespace:XCalendar.Forms.Views;assembly=XCalendar.Forms">
    
        <xc:CalendarView
            Days="{Binding MyCalendar.Days}"
            DaysOfWeek="{Binding MyCalendar.DayNamesOrder}"
            NavigatedDate="{Binding MyCalendar.NavigatedDate}"/>

</ContentPage>

Alternatively, these properties can be set directly from code-behind without the use of MVVM.

Youtube Tutorial (Outdated - Uses version 1.2.1 for Xamarin Forms)

Beautiful, Extensive and FREE Calendar Control for Xamarin.Forms

.NET MAUI

Install the NuGet package

Create a Calendar in your ViewModel

public Calendar MyCalendar { get; set; } = new Calendar();

Add the following xmlns to your page or view

xmlns:xc="clr-namespace:XCalendar.Maui.Views;assembly=XCalendar.Maui"

Bind to the properties of your Calendar

<ContentPage
    x:Class="MauiApp1.MainPage"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:xc="clr-namespace:XCalendar.Maui.Views;assembly=XCalendar.Maui">
    
        <xc:CalendarView
            Days="{Binding MyCalendar.Days}"
            DaysOfWeek="{Binding MyCalendar.DayNamesOrder}"
            NavigatedDate="{Binding MyCalendar.NavigatedDate}"/>

</ContentPage>

Alternatively, these properties can be set directly from code-behind without the use of MVVM.

About

A simple demonstration on how to use the XCalendar plugin for .NET, Xamarin Forms, and .NET MAUI.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages