Class CalendarBlackoutDatesCollection
Represents a collection of DateTimeRanges.
Inheritance
System.Object
CalendarBlackoutDatesCollection
Namespace: Syncfusion.Windows.Controls
Assembly: Syncfusion.Shared.Wpf.dll
Syntax
public sealed class CalendarBlackoutDatesCollection : ObservableCollection<CalendarDateRange>
Constructors
CalendarBlackoutDatesCollection()
Declaration
public CalendarBlackoutDatesCollection()
CalendarBlackoutDatesCollection(Calendar)
Initializes a new instance of the CalendarBlackoutDatesCollection class.
Declaration
public CalendarBlackoutDatesCollection(Calendar owner)
Parameters
Type | Name | Description |
---|---|---|
Calendar | owner |
Methods
AddDatesInPast()
Dates that are in the past are added to the BlackoutDates.
Declaration
public void AddDatesInPast()
ClearItems()
All the items in the collection are removed.
Declaration
protected override void ClearItems()
Contains(DateTime)
Checks if a DateTime is in the Collection
Declaration
public bool Contains(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | date |
Returns
Type |
---|
System.Boolean |
Contains(DateTime, DateTime)
Checks if a Range is in the collection
Declaration
public bool Contains(DateTime start, DateTime end)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | start | |
System.DateTime | end |
Returns
Type |
---|
System.Boolean |
ContainsAny(CalendarDateRange)
Returns true if any day in the given DateTime range is contained in the BlackOutDays.
Declaration
public bool ContainsAny(CalendarDateRange range)
Parameters
Type | Name | Description |
---|---|---|
CalendarDateRange | range | CalendarDateRange that is searched in BlackOutDays |
Returns
Type | Description |
---|---|
System.Boolean | true if at least one day in the range is included in the BlackOutDays |
InsertItem(Int32, CalendarDateRange)
The item is inserted in the specified place in the collection.
Declaration
protected override void InsertItem(int index, CalendarDateRange item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
CalendarDateRange | item |
RemoveItem(Int32)
The item in the specified index is removed from the collection.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
SetItem(Int32, CalendarDateRange)
The object in the specified index is replaced with the provided item.
Declaration
protected override void SetItem(int index, CalendarDateRange item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
CalendarDateRange | item |