Class
ElementCollection<T>

Represents a typed collection of Node instances. For example an element instance may aggregate two or more typed collections of different nodes.

Definition

Namespace:Telerik.Core

Assembly:Telerik.WinUI.Controls.dll

Type Parameters:

T

Must be a Node.

Syntax:

cs-api-definition
public class ElementCollection<T> : Collection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : Node

Inheritance: objectCollection<T>ElementCollection<T>

Derived Classes: DataPointCollection<T>

Implements: ICollectionICollection<T>IEnumerableIEnumerable<T>IListIList<T>IReadOnlyCollection<T>IReadOnlyList<T>

Inherited Members Collection<T>.Add(T)Collection<T>.Clear()Collection<T>.CopyTo(T[], int)Collection<T>.Contains(T)Collection<T>.GetEnumerator()Collection<T>.IndexOf(T)Collection<T>.Insert(int, T)Collection<T>.Remove(T)Collection<T>.RemoveAt(int)Collection<T>.SetItem(int, T)Collection<T>.CountCollection<T>.ItemsCollection<T>.this[int]

Constructors

ElementCollection(Element)

Initializes a new instance of the ElementCollection<T> class.

Declaration

cs-api-definition
public ElementCollection(Element owner)

Parameters

owner

Element

The owner.

Properties

ShouldCacheIndexes

Gets a value indicating whether the collection should cache the index of each node added. This will improve performance if many IndexOf calls will be performed upon this collection.

Declaration

cs-api-definition
protected virtual bool ShouldCacheIndexes { get; }

Property Value

bool

Methods

ClearItems()

Removes all items from the collection.

Declaration

cs-api-definition
protected override void ClearItems()

Overrides Collection<T>.ClearItems()

InsertItem(int, T)

Inserts the item at the specified index.

Declaration

cs-api-definition
protected override void InsertItem(int index, T item)

Parameters

index

int

The index.

item

T

The item.

Overrides Collection<T>.InsertItem(int, T)

RemoveItem(int)

Removes the item at the specified index.

Declaration

cs-api-definition
protected override void RemoveItem(int index)

Parameters

index

int

The index.

Overrides Collection<T>.RemoveItem(int)