Table of Contents

Class CalendarBlackoutDatesCollection

Namespace
Avalonia.Controls.Primitives
Assembly
Avalonia.Controls.dll
public sealed class CalendarBlackoutDatesCollection : ObservableCollection<CalendarDateRange>, IList<CalendarDateRange>, ICollection<CalendarDateRange>, IList, ICollection, IReadOnlyList<CalendarDateRange>, IReadOnlyCollection<CalendarDateRange>, IEnumerable<CalendarDateRange>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Inheritance
CalendarBlackoutDatesCollection
Implements
Inherited Members

Constructors

CalendarBlackoutDatesCollection(Calendar)

Initializes a new instance of the CalendarBlackoutDatesCollection class.

public CalendarBlackoutDatesCollection(Calendar owner)

Parameters

owner Calendar

The Calendar whose dates this object represents.

Methods

AddDatesInPast()

Adds all dates before Today to the collection.

public void AddDatesInPast()

ClearItems()

Removes all items from the collection.

protected override void ClearItems()

Remarks

This implementation raises the CollectionChanged event.

Contains(DateTime)

Returns a value that represents whether this collection contains the specified date.

public bool Contains(DateTime date)

Parameters

date DateTime

The date to search for.

Returns

bool

True if the collection contains the specified date; otherwise, false.

Contains(DateTime, DateTime)

Returns a value that represents whether this collection contains the specified range of dates.

public bool Contains(DateTime start, DateTime end)

Parameters

start DateTime

The start of the date range.

end DateTime

The end of the date range.

Returns

bool

True if all dates in the range are contained in the collection; otherwise, false.

ContainsAny(CalendarDateRange)

Returns a value that represents whether this collection contains any date in the specified range.

public bool ContainsAny(CalendarDateRange range)

Parameters

range CalendarDateRange

The range of dates to search for.

Returns

bool

True if any date in the range is contained in the collection; otherwise, false.

InsertItem(int, CalendarDateRange)

Inserts an item into the collection at the specified index.

protected override void InsertItem(int index, CalendarDateRange item)

Parameters

index int

The zero-based index at which item should be inserted.

item CalendarDateRange

The object to insert.

Remarks

This implementation raises the CollectionChanged event.

RemoveItem(int)

Removes the item at the specified index of the collection.

protected override void RemoveItem(int index)

Parameters

index int

The zero-based index of the element to remove.

Remarks

This implementation raises the CollectionChanged event.

SetItem(int, CalendarDateRange)

Replaces the element at the specified index.

protected override void SetItem(int index, CalendarDateRange item)

Parameters

index int

The zero-based index of the element to replace.

item CalendarDateRange

The new value for the element at the specified index.

Remarks

This implementation raises the CollectionChanged event.