New to Telerik UI for WinForms? Start a free 30-day trial

Represents the child views attached to a calendar view or to a root calendar.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class CalendarViewCollection : IList, ICollection, IEnumerable

Inheritance: objectCalendarViewCollection

Implements: ICollectionIEnumerableIList

Properties

Gets the calendar associated with this collection's owner, or the root calendar when the collection has no owner.

C#
public RadCalendar Calendar { get; }

Gets the total number of CalendarView objects in the collection.

C#
public virtual int Count { get; }

Implements: ICollection.Count

Gets the view that owns this child-view collection, or null for a root collection.

C#
public CalendarView Owner { get; }

Gets or sets the CalendarView at the specified indexed location in the collection.

C#
public virtual CalendarView this[int index] { get; set; }
Parameters:indexint

The indexed location of the CalendarView in the collection.

Property Value:

The CalendarView at the specified indexed location in the collection.

The name-based indexer is not implemented; its getter returns null for every name.

C#
public virtual CalendarView this[string str] { get; }
Parameters:strstring

The name of the CalendarView in the collection.

Property Value:

The getter currently returns null for every name; it does not search the collection.

Methods

Adds a previously created CalendarView object to the end of the CalendarViewCollection.

C#
public virtual CalendarView Add(CalendarView view)
Parameters:viewCalendarView

The CalendarView object to add to the collection.

Returns:

CalendarView

The added view, or null if the collection already contains that view.

Adds an collection of previously created CalendarView objects to the collection.

C#
public virtual CalendarViewCollection AddRange(CalendarViewCollection viewsCollection)
Parameters:viewsCollectionCalendarViewCollection

The collection of views to add.

Returns:

CalendarViewCollection

The supplied viewsCollection instance, not the collection receiving the views.

Removes all CalendarView objects from the collection.

C#
public void Clear()

Finds the calendar views with specified key, optionally searching child views.

C#
public CalendarView[] Find(string key, bool searchAllChildren)
Parameters:keystring

The name of the calendar view to search for.

searchAllChildrenbool

true to search child views; otherwise, false.

Returns:

CalendarView[]

An array of CalendarView objects whose Name property matches the specified key.

Returns an enumerator that can be used to iterate through the CalendarView collection.

C#
public virtual IEnumerator<CalendarView> GetEnumerator()
Returns:

IEnumerator<CalendarView>

An IEnumerator that represents the CalendarView collection.

Returns the index of the specified calendar view in the collection.

C#
public virtual int IndexOf(CalendarView view)
Parameters:viewCalendarView

The CalendarView to locate in the collection.

Returns:

int

The zero-based index of the item found in the calendar view collection; otherwise, -1.

Inserts an existing CalendarView object into the CalendarViewCollection at the specified location.

C#
public virtual void Insert(int index, CalendarView view)
Parameters:indexint

The indexed location within the collection to insert the CalendarView object.

viewCalendarView

The CalendarView object to insert into the collection.

Removes the specified CalendarView object from the CalendarViewCollection.

C#
public virtual void Remove(CalendarView view)
Parameters:viewCalendarView

The CalendarView object to remove.

Updates correctly the visual appearance of RadCalendar. Updates the parential dependencies (parent and Calendar properties) also.

C#
protected virtual void UpdateOwnerShip(CalendarView view)
Parameters:viewCalendarView

the CalendarView that will be updated