Skip to main content

ItemCollection Class

Holds the list of items that constitute the content of an ItemsControl.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public class ItemCollection : ItemsSourceView, 
IList, ICollection, IEnumerable
View Source
InheritanceObjectItemsSourceView → ItemCollection
ImplementsICollection, IEnumerable, IList

Properties

CountGets the number of items in the collection.
(Inherited from ItemsSourceView)
IsReadOnly 
Item(Int32) 
SourceGets the source collection.
(Inherited from ItemsSourceView)

Methods

Add(Object)Adds an item to the ItemsControl.
Clear()Clears the collection and releases the references on all items currently in the collection.
Contains(Object)
(Inherited from ItemsSourceView)
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize()Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetAt(Int32)Retrieves the item at the specified index.
(Inherited from ItemsSourceView)
GetEnumerator()
(Inherited from ItemsSourceView)
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
IndexOf(Object)
(Inherited from ItemsSourceView)
Insert(Int32, Object)Inserts an element into the collection at the specified index.
MemberwiseClone()Creates a shallow copy of the current Object.
(Inherited from Object)
Remove(Object)Removes the specified item reference from the collection or view.
RemoveAt(Int32)Removes the item at the specified index of the collection or view.
ToString()Returns a string that represents the current object.
(Inherited from Object)

Events

CollectionChangedOccurs when the collection has changed to indicate the reason for the change and which items changed.
(Inherited from ItemsSourceView)

See Also

Reference

Avalonia.Controls Namespace