Skip to main content

BlackoutDates Property

Gets a collection of dates that are marked as not selectable.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public CalendarBlackoutDatesCollection BlackoutDates { get; }

Property Value

CalendarBlackoutDatesCollection
A collection of dates that cannot be selected. The default value is an empty collection.

Remarks

Dates in this collection will appear as disabled on the calendar.

To make all past dates not selectable, you can use the AddDatesInPast method provided by the collection returned by this property.

Exceptions

ArgumentOutOfRangeExceptionAdding a date to this collection when it is already selected or adding a date outside the range specified by DisplayDateStart and DisplayDateEnd.

See Also

Reference

Calendar Class
Avalonia.Controls Namespace