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

Definition

Namespace:Telerik.WinControls.Elements

Assembly:Telerik.WinControls.dll

Syntax:

C#
[ListBindable(false)]
public class RadItemReadOnlyCollection : ReadOnlyCollectionBase, ICollection, IEnumerable

Inheritance: objectReadOnlyCollectionBaseRadItemReadOnlyCollection

Implements: ICollectionIEnumerable

Inherited Members ReadOnlyCollectionBase.InnerListReadOnlyCollectionBase.Count

Constructors

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

C#
public RadItemReadOnlyCollection(RadItem[] value)
Parameters:valueRadItem[]

A array of RadElement objects with which to intialize the collection

Initializes a new instance of RadItemCollection based on another RadItemCollection.

C#
public RadItemReadOnlyCollection(RadItemOwnerCollection value)
Parameters:valueRadItemOwnerCollection

A RadItemCollection from which the contents are copied

Properties

Represents the entry at the specified index of the RadElement.

C#
public RadItem this[int index] { get; }
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

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

C#
public bool Contains(RadItem value)
Parameters:valueRadItem

The RadElement to locate.

Returns:

bool

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

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

C#
public void CopyTo(RadItem[] array, int index)
Parameters:arrayRadItem[]

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

indexint

The index in array where copying begins.

Exceptions:

ArgumentException

array is multidimensional.

-or-

The number of elements in the RadItemCollection 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.

C#
public RadItemReadOnlyCollection.RadItemReadOnlyEnumerator GetEnumerator()
Returns:

RadItemReadOnlyCollection.RadItemReadOnlyEnumerator

Returns the index of a RadElement in the RadItemCollection .

C#
public int IndexOf(RadItem value)
Parameters:valueRadItem

The RadElement to locate.

Returns:

int

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

C#
protected virtual void OnItemsChanged(RadItemCollection changed, RadItem target, ItemsChangeOperation operation)
Parameters:changedRadItemCollectiontargetRadItemoperationItemsChangeOperation

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.

Retrieves an array of the items in the collection.

C#
public RadItem[] ToArray()
Returns:

RadItem[]

Events

C#
public event ItemChangedDelegate ItemsChanged