Class
RadElementCollection

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:

cs-api-definition
public class RadElementCollection : CollectionBase, IList, ICollection, IEnumerable

Inheritance: objectCollectionBaseRadElementCollection

Implements: ICollectionIEnumerableIList

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

Constructors

RadElementCollection(RadElement)

Initializes a new instance of the RadElementCollection.

Declaration

cs-api-definition
public RadElementCollection(RadElement owner)

Parameters

owner

RadElement

RadElementCollection(RadElement, RadElementCollection)

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

Declaration

cs-api-definition
public RadElementCollection(RadElement owner, RadElementCollection value)

Parameters

owner

RadElement

value

RadElementCollection

A RadElementCollection from which the contents are copied

RadElementCollection(RadElement, RadElement[])

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

Declaration

cs-api-definition
public RadElementCollection(RadElement owner, RadElement[] value)

Parameters

owner

RadElement

value

RadElement[]

A array of RadElement objects with which to intialize the collection

Properties

Owner

Gets the RadElement that owns this collection.

Declaration

cs-api-definition
public RadElement Owner { get; }

Property Value

RadElement

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.

this[int]

Represents the entry at the specified index of the RadElement.

Declaration

cs-api-definition
public RadElement this[int index] { get; set; }

Parameters

index

int

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

Property Value

RadElement

The entry at the specified index of the collection.

Exceptions

ArgumentOutOfRangeException

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

Methods

Add(RadElement)

Adds a RadElement with the specified value to the RadElementCollection .

Declaration

cs-api-definition
public int Add(RadElement value)

Parameters

value

RadElement

The RadElement to add.

Returns

int

The index at which the new element was inserted.

AddRange(IList<RadElement>)

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

Declaration

cs-api-definition
public void AddRange(IList<RadElement> value)

Parameters

value

IList<RadElement>

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

AddRange(RadElementCollection)

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

Declaration

cs-api-definition
public void AddRange(RadElementCollection value)

Parameters

value

RadElementCollection

A RadElementCollection containing the objects to add to the collection.

AddRange(params RadElement[])

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

Declaration

cs-api-definition
public void AddRange(params RadElement[] value)

Parameters

value

RadElement[]

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

BinarySearch(int, int, RadElement, IComparer)

Declaration

cs-api-definition
public int BinarySearch(int index, int count, RadElement value, IComparer comparer)

Parameters

index

int

count

int

value

RadElement

comparer

IComparer

Returns

int

Contains(RadElement)

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

Declaration

cs-api-definition
public bool Contains(RadElement value)

Parameters

value

RadElement

The RadElement to locate.

Returns

bool

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

CopyTo(RadElement[], int)

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

Declaration

cs-api-definition
public void CopyTo(RadElement[] array, int index)

Parameters

array

RadElement[]

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

index

int

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.

GetEnumerator()

Returns an enumerator that can iterate through the RadElementCollection .

Declaration

cs-api-definition
public RadElementCollection.RadElementEnumerator GetEnumerator()

Returns

RadElementCollection.RadElementEnumerator

None.

IndexOf(RadElement)

Returns the index of a RadElement in the RadElementCollection .

Declaration

cs-api-definition
public int IndexOf(RadElement value)

Parameters

value

RadElement

The RadElement to locate.

Returns

int

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

Insert(int, RadElement)

Inserts a RadElement into the RadElementCollection at the specified index.

Declaration

cs-api-definition
public void Insert(int index, RadElement value)

Parameters

index

int

The zero-based index where value should be inserted.

value

RadElement

The RadElement to insert.

Move(int, int)

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

Declaration

cs-api-definition
public void Move(int indexFrom, int indexTo)

Parameters

indexFrom

int

The zero-based index of the element to move

indexTo

int

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

OnClear()

Declaration

cs-api-definition
protected override void OnClear()

Overrides CollectionBase.OnClear()

OnClearComplete()

Declaration

cs-api-definition
protected override void OnClearComplete()

Overrides CollectionBase.OnClearComplete()

OnInsert(int, object)

Declaration

cs-api-definition
protected override void OnInsert(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnInsert(int, object)

OnInsertComplete(int, object)

Declaration

cs-api-definition
protected override void OnInsertComplete(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnInsertComplete(int, object)

OnRemove(int, object)

Declaration

cs-api-definition
protected override void OnRemove(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnRemove(int, object)

OnRemoveComplete(int, object)

Declaration

cs-api-definition
protected override void OnRemoveComplete(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnRemoveComplete(int, object)

OnSet(int, object, object)

Declaration

cs-api-definition
protected override void OnSet(int index, object oldValue, object newValue)

Parameters

index

int

oldValue

object

newValue

object

Overrides CollectionBase.OnSet(int, object, object)

OnSetComplete(int, object, object)

Declaration

cs-api-definition
protected override void OnSetComplete(int index, object oldValue, object newValue)

Parameters

index

int

oldValue

object

newValue

object

Overrides CollectionBase.OnSetComplete(int, object, object)

OnValidate(object)

Declaration

cs-api-definition
protected override void OnValidate(object value)

Parameters

value

object

Overrides CollectionBase.OnValidate(object)

Remove(RadElement)

Removes a specific RadElement from the RadElementCollection .

Declaration

cs-api-definition
public void Remove(RadElement value)

Parameters

value

RadElement

The RadElement to remove from the RadElementCollection .

Exceptions

ArgumentException

value is not found in the Collection.

Sort()

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

Declaration

cs-api-definition
public void Sort()

Sort(IComparer)

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

Declaration

cs-api-definition
public void Sort(IComparer comparer)

Parameters

comparer

IComparer

The IComparer implementation to use when comparing elements.

Sort(int, int, IComparer)

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

Declaration

cs-api-definition
public void Sort(int index, int count, IComparer comparer)

Parameters

index

int

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

count

int

The length of the range to sort.

comparer

IComparer

The IComparer implementation to use when comparing elements.

SwitchItems(int, int)

Declaration

cs-api-definition
public void SwitchItems(int indexFrom, int indexTo)

Parameters

indexFrom

int

indexTo

int