ClassRadElementCollection
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:
public class RadElementCollection : CollectionBase, IList, ICollection, IEnumerable
Inheritance: objectCollectionBaseRadElementCollection
Implements:
Inherited Members
Constructors
RadElementCollection(RadElement)
Initializes a new instance of the RadElementCollection.
Declaration
public RadElementCollection(RadElement owner)
Parameters
owner
RadElementCollection(RadElement, RadElementCollection)
Initializes a new instance of the RadElementCollection based on another RadElementCollection.
Declaration
public RadElementCollection(RadElement owner, RadElementCollection value)
Parameters
owner
value
A RadElementCollection from which the contents are copied
RadElementCollection(RadElement, RadElement[])
Initializes a new instance of RadElementCollection containing any array of RadElement objects.
Declaration
public RadElementCollection(RadElement owner, RadElement[] value)
Parameters
owner
value
A array of RadElement objects with which to intialize the collection
Properties
Owner
Gets the RadElement that owns this collection.
Declaration
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.
this[int]
Represents the entry at the specified index of the RadElement.
Declaration
public RadElement this[int index] { get; set; }
Parameters
index
The zero-based index of the entry to locate in the collection.
Property Value
The entry at the specified index of the collection.
Exceptions
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
public int Add(RadElement value)
Parameters
value
The RadElement to add.
Returns
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
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
public void AddRange(RadElementCollection value)
Parameters
value
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
public void AddRange(params RadElement[] value)
Parameters
value
An array of type RadElement containing the objects to add to the collection.
BinarySearch(int, int, RadElement, IComparer)
Declaration
public int BinarySearch(int index, int count, RadElement value, IComparer comparer)
Parameters
index
count
value
comparer
Returns
Contains(RadElement)
Gets a value indicating whether the RadElementCollection contains the specified RadElement.
Declaration
public bool Contains(RadElement value)
Parameters
value
The RadElement to locate.
Returns
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
public void CopyTo(RadElement[] array, int index)
Parameters
array
The one-dimensional Array that is the destination of the values copied from RadElementCollection .
index
The index in array where copying begins.
Exceptions
array is multidimensional.
-or-
The number of elements in the RadElementCollection is greater than the available space between index and the end of array.
array is null.
index is less than array's lowbound.
GetEnumerator()
Returns an enumerator that can iterate through the RadElementCollection .
Declaration
public RadElementCollection.RadElementEnumerator GetEnumerator()
Returns
RadElementCollection.RadElementEnumerator
None.
IndexOf(RadElement)
Returns the index of a RadElement in the RadElementCollection .
Declaration
public int IndexOf(RadElement value)
Parameters
value
The RadElement to locate.
Returns
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
public void Insert(int index, RadElement value)
Parameters
index
The zero-based index where value should be inserted.
value
The RadElement to insert.
Move(int, int)
Moves the element at position a given position to a new position
OnClear()
Declaration
protected override void OnClear()
Overrides
OnClearComplete()
Declaration
protected override void OnClearComplete()
Overrides
OnValidate(object)
Declaration
protected override void OnValidate(object value)
Parameters
value
Overrides
Remove(RadElement)
Removes a specific RadElement from the RadElementCollection .
Declaration
public void Remove(RadElement value)
Parameters
value
The RadElement to remove from the RadElementCollection .
Exceptions
value is not found in the Collection.
Sort()
Sorts the elements in the entire RadElementCollection using the IComparable implementation of each element.
Declaration
public void Sort()
Sort(IComparer)
Sorts the elements in the entire RadElementCollection using the specified comparer.
Declaration
public void Sort(IComparer comparer)
Parameters
comparer
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.