
'Declaration
Public Class Calendar Inherits Control Implements Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.ILayout, Microsoft.Maui.Controls.ILayoutController, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IContentView, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.ICrossPlatformLayout, Microsoft.Maui.IElement, Microsoft.Maui.IPadding, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.IToolTipElement, Microsoft.Maui.ITransform, Microsoft.Maui.IView, Microsoft.Maui.IVisualTreeElement
'Usage
Dim instance As Calendar
public class Calendar : Control, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.ILayout, Microsoft.Maui.Controls.ILayoutController, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IContentView, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.ICrossPlatformLayout, Microsoft.Maui.IElement, Microsoft.Maui.IPadding, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.IToolTipElement, Microsoft.Maui.ITransform, Microsoft.Maui.IView, Microsoft.Maui.IVisualTreeElement
The selected month can easily be changed with the Up & Down RepeatButtons or by clicking on the month's name, which will allow the user to choose from one of the 12 months in the year.
There are also 5 CalendarSelectionModes which can be used for selecting dates; they allow to choose values ranging from a single date to mutiple CalendarDateRanges.
Furthermore, single dates or CalendarDateRanges can be blacked out to make sure that they are not selected by the user. This is done via the CalendarBlackoutDatesCollection class.
Note that when needed, the CalendarMode can be changed to display the months in a year or the years in a decade.
The following code would display this control:
<xctk:Calendar SelectionMode="Range" SelectedDate="2024-04-29" Margin="20" BorderBrush="Yellow" BorderThickness="2" WidthRequest="260" HeightRequest="300"/>
System.Object
Microsoft.Maui.Controls.BindableObject
Microsoft.Maui.Controls.Element
Microsoft.Maui.Controls.NavigableElement
Microsoft.Maui.Controls.VisualElement
Microsoft.Maui.Controls.View
Microsoft.Maui.Controls.Compatibility.Layout
Microsoft.Maui.Controls.TemplatedView
Xceed.Maui.Toolkit.Control
Xceed.Maui.Toolkit.Calendar
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2