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:
public class RadElementCollection : CollectionBase, IList, ICollection, IEnumerable
Inheritance: objectCollectionBaseRadElementCollection
Implements:
Inherited Members
Constructors
Initializes a new instance of RadElementCollection containing any array of RadElement objects.
public RadElementCollection(RadElement owner, RadElement[] value)
A array of RadElement objects with which to intialize the collection
Initializes a new instance of the RadElementCollection based on another RadElementCollection.
public RadElementCollection(RadElement owner, RadElementCollection value)
A RadElementCollection from which the contents are copied
Initializes a new instance of the RadElementCollection.
Properties
Gets the RadElement that owns this collection.
public RadElement Owner { get; }
The RadElement instance that owns and manages this collection of child elements.
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.
public RadElement this[int index] { get; set; }
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
Adds a RadElement with the specified value to the RadElementCollection .
public int Add(RadElement value)
The RadElement to add.
Returns:The index at which the new element was inserted.
Copies the elements of an IList of RadElements to the end of the RadElementCollection.
public void AddRange(IList<RadElement> value)
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.
public void AddRange(params RadElement[] value)
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.
public void AddRange(RadElementCollection value)
A RadElementCollection containing the objects to add to the collection.
public int BinarySearch(int index, int count, RadElement value, IComparer comparer)
Gets a value indicating whether the RadElementCollection contains the specified RadElement.
public bool Contains(RadElement value)
The RadElement to locate.
Returns: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.
public void CopyTo(RadElement[] array, int index)
The one-dimensional Array that is the destination of the values copied from RadElementCollection .
indexintThe index in array where copying begins.
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.
Returns an enumerator that can iterate through the RadElementCollection .
public RadElementCollection.RadElementEnumerator GetEnumerator()
RadElementCollection.RadElementEnumerator
None.
Returns the index of a RadElement in the RadElementCollection .
public int IndexOf(RadElement value)
The RadElement to locate.
Returns:The index of the RadElement of value in the
RadElementCollection, if found; otherwise, -1.
Inserts a RadElement into the RadElementCollection at the specified index.
public void Insert(int index, RadElement value)
The zero-based index where value should be inserted.
The RadElement to insert.
protected override void OnClear()
Overrides:
protected override void OnClearComplete()
Overrides:
Removes a specific RadElement from the RadElementCollection .
public void Remove(RadElement value)
The RadElement to remove from the RadElementCollection .
Exceptions:value is not found in the Collection.
Sorts the elements in the entire RadElementCollection using the IComparable implementation of each element.
public void Sort()
Sorts the elements in the entire RadElementCollection using the specified comparer.
public void Sort(IComparer comparer)
The IComparer implementation to use when comparing elements.
Sorts the elements in a range of elements in RadElementCollection using the specified comparer.