Class
AttachableObjectCollection<TOwner, TObject>

Represents a collection of attachable objects that can be associated with an owner.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Type Parameters:

TOwner

The type of the owner object.

TObject

The type of attachable objects in the collection.

Syntax:

cs-api-definition
public class AttachableObjectCollection<TOwner, TObject> : ObservableCollection<TObject>, IList<TObject>, ICollection<TObject>, IList, ICollection, IReadOnlyList<TObject>, IReadOnlyCollection<TObject>, IEnumerable<TObject>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged where TOwner : class where TObject : AttachableObject<TOwner>

Inheritance: objectCollection<TObject>ObservableCollection<TObject>AttachableObjectCollection<TOwner, TObject>

Derived Classes: CommandCollection<T>

Implements: ICollectionICollection<TObject>IEnumerableIEnumerable<TObject>IListIList<TObject>INotifyCollectionChangedINotifyPropertyChangedIReadOnlyCollection<TObject>IReadOnlyList<TObject>

Inherited Members ObservableCollection<TObject>.Move(int, int)ObservableCollection<TObject>.MoveItem(int, int)ObservableCollection<TObject>.OnPropertyChanged(PropertyChangedEventArgs)ObservableCollection<TObject>.OnCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<TObject>.BlockReentrancy()ObservableCollection<TObject>.CheckReentrancy()ObservableCollection<TObject>.CollectionChangedObservableCollection<TObject>.PropertyChangedCollection<TObject>.Add(TObject)Collection<TObject>.Clear()Collection<TObject>.CopyTo(TObject[], int)Collection<TObject>.Contains(TObject)Collection<TObject>.GetEnumerator()Collection<TObject>.IndexOf(TObject)Collection<TObject>.Insert(int, TObject)Collection<TObject>.Remove(TObject)Collection<TObject>.RemoveAt(int)Collection<TObject>.CountCollection<TObject>.ItemsCollection<TObject>.this[int]

Methods

ClearItems()

Removes all items from the collection and detaches them from the owner.

Declaration

cs-api-definition
protected override void ClearItems()

Overrides ObservableCollection<TObject>.ClearItems()

InsertItem(int, TObject)

Inserts an item at the specified index and attaches it to the owner.

Declaration

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

Parameters

index

int

The zero-based index at which the item should be inserted.

item

TObject

The item to insert.

Overrides ObservableCollection<TObject>.InsertItem(int, TObject)

RemoveItem(int)

Removes the item at the specified index and detaches it from the owner.

Declaration

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

Parameters

index

int

The zero-based index of the item to remove.

Overrides ObservableCollection<TObject>.RemoveItem(int)

SetItem(int, TObject)

Replaces the item at the specified index and updates owner associations.

Declaration

cs-api-definition
protected override void SetItem(int index, TObject item)

Parameters

index

int

The zero-based index of the item to replace.

item

TObject

The new item to set at the specified index.

Overrides ObservableCollection<TObject>.SetItem(int, TObject)