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
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
DateTimeThe 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
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
CalendarDateRangeThe 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
intThe zero-based index at which item should be inserted.
item
CalendarDateRangeThe 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
intThe 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
intThe zero-based index of the element to replace.
item
CalendarDateRangeThe new value for the element at the specified index.
Remarks
This implementation raises the CollectionChanged event.