New to Telerik UI for WinFormsStart a free 30-day trial

Represents a strongly-typed collection of RadElement objects that manages the hierarchical relationships and lifecycle of child elements within the Telerik Presentation Framework.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class RadElementCollection : CollectionBase, IList, ICollection, IEnumerable

Inheritance: objectCollectionBaseRadElementCollection

Implements: ICollectionIEnumerableIList

Inherited Members CollectionBase.Clear()CollectionBase.RemoveAt(int)CollectionBase.InnerListCollectionBase.ListCollectionBase.CapacityCollectionBase.Count...

Constructors

Initializes a new instance of RadElementCollection containing any array of RadElement objects.

C#
public RadElementCollection(RadElement owner, RadElement[] value)
Parameters:ownerRadElementvalueRadElement[]

A array of RadElement objects with which to intialize the collection

Initializes a new instance of the RadElementCollection based on another RadElementCollection.

C#
public RadElementCollection(RadElement owner, RadElementCollection value)
Parameters:ownerRadElementvalueRadElementCollection

A RadElementCollection from which the contents are copied

Initializes a new instance of the RadElementCollection.

C#
public RadElementCollection(RadElement owner)
Parameters:ownerRadElement

Properties

Gets the RadElement that owns this collection.

C#
public RadElement Owner { get; }
Property Value:

The RadElement instance that owns and manages this collection of child elements.

Remarks:

The owner element is responsible for managing the lifecycle, layout, and rendering of all elements in this collection. When elements are added to or removed from the collection, their parent-child relationships are automatically established with the owner element.

Represents the entry at the specified index of the RadElement.

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

The zero-based index of the entry to locate in the collection.

Property Value:

The entry at the specified index of the collection.

Exceptions:

ArgumentOutOfRangeException

index is outside the valid range of indexes for the collection.

Methods

Adds a RadElement with the specified value to the RadElementCollection .

C#
public int Add(RadElement value)
Parameters:valueRadElement

The RadElement to add.

Returns:

int

The index at which the new element was inserted.

Copies the elements of an IList of RadElements to the end of the RadElementCollection.

C#
public void AddRange(IList<RadElement> value)
Parameters:valueIList<RadElement>

An List of type RadElement containing the objects to add to the collection.

Copies the elements of an array to the end of the RadElementCollection.

C#
public void AddRange(params RadElement[] value)
Parameters:valueRadElement[]

An array of type RadElement containing the objects to add to the collection.

Adds the contents of another RadElementCollection to the end of the collection.

C#
public void AddRange(RadElementCollection value)
Parameters:valueRadElementCollection

A RadElementCollection containing the objects to add to the collection.

C#
public int BinarySearch(int index, int count, RadElement value, IComparer comparer)
Parameters:indexintcountintvalueRadElementcomparerIComparerReturns:

int

Gets a value indicating whether the RadElementCollection contains the specified RadElement.

C#
public bool Contains(RadElement value)
Parameters:valueRadElement

The RadElement to locate.

Returns:

bool

true if the RadElement is contained in the collection; otherwise, false.

Copies the RadElementCollection values to a one-dimensional Array instance at the specified index.

C#
public void CopyTo(RadElement[] array, int index)
Parameters:arrayRadElement[]

The one-dimensional Array that is the destination of the values copied from RadElementCollection .

indexint

The index in array where copying begins.

Exceptions:

ArgumentException

array is multidimensional.

-or-

The number of elements in the RadElementCollection is greater than the available space between index and the end of array.

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than array's lowbound.

Returns an enumerator that can iterate through the RadElementCollection .

C#
public RadElementCollection.RadElementEnumerator GetEnumerator()
Returns:

RadElementCollection.RadElementEnumerator

None.

Returns the index of a RadElement in the RadElementCollection .

C#
public int IndexOf(RadElement value)
Parameters:valueRadElement

The RadElement to locate.

Returns:

int

The index of the RadElement of value in the RadElementCollection, if found; otherwise, -1.

Inserts a RadElement into the RadElementCollection at the specified index.

C#
public void Insert(int index, RadElement value)
Parameters:indexint

The zero-based index where value should be inserted.

valueRadElement

The RadElement to insert.

Moves the element at position a given position to a new position

C#
public void Move(int indexFrom, int indexTo)
Parameters:indexFromint

The zero-based index of the element to move

indexToint

The zero-based index of the position where the element is to be placed

C#
protected override void OnClear()

Overrides: CollectionBase.OnClear()

C#
protected override void OnClearComplete()

Overrides: CollectionBase.OnClearComplete()

C#
protected override void OnInsert(int index, object value)
Parameters:indexintvalueobject

Overrides: CollectionBase.OnInsert(int, object)

C#
protected override void OnInsertComplete(int index, object value)
Parameters:indexintvalueobject

Overrides: CollectionBase.OnInsertComplete(int, object)

C#
protected override void OnRemove(int index, object value)
Parameters:indexintvalueobject

Overrides: CollectionBase.OnRemove(int, object)

C#
protected override void OnRemoveComplete(int index, object value)
Parameters:indexintvalueobject

Overrides: CollectionBase.OnRemoveComplete(int, object)

C#
protected override void OnSet(int index, object oldValue, object newValue)
Parameters:indexintoldValueobjectnewValueobject

Overrides: CollectionBase.OnSet(int, object, object)

C#
protected override void OnSetComplete(int index, object oldValue, object newValue)
Parameters:indexintoldValueobjectnewValueobject

Overrides: CollectionBase.OnSetComplete(int, object, object)

C#
protected override void OnValidate(object value)
Parameters:valueobject

Overrides: CollectionBase.OnValidate(object)

Removes a specific RadElement from the RadElementCollection .

C#
public void Remove(RadElement value)
Parameters:valueRadElement

The RadElement to remove from the RadElementCollection .

Exceptions:

ArgumentException

value is not found in the Collection.

Sorts the elements in the entire RadElementCollection using the IComparable implementation of each element.

C#
public void Sort()

Sorts the elements in the entire RadElementCollection using the specified comparer.

C#
public void Sort(IComparer comparer)
Parameters:comparerIComparer

The IComparer implementation to use when comparing elements.

Sorts the elements in a range of elements in RadElementCollection using the specified comparer.

C#
public void Sort(int index, int count, IComparer comparer)
Parameters:indexint

The zero-based starting index of the range to sort.

countint

The length of the range to sort.

comparerIComparer

The IComparer implementation to use when comparing elements.

C#
public void SwitchItems(int indexFrom, int indexTo)
Parameters:indexFromintindexToint