AvaloniaList is similar to ObservableCollection`1 with a few added features:
- It can be configured to notify the CollectionChanged event with a Remove action instead of a Reset when the list is cleared by setting ResetBehavior to Remove. removed
- A Validate function can be used to validate each item before insertion. removed
Constructors
-
Avalonia
List`1() Initializes a new instance of the AvaloniaList`1 class. -
Avalonia
List`1(IEnumerable<`0>) Initializes a new instance of the AvaloniaList`1 class. -
Avalonia
List`1(`0[]) Initializes a new instance of the AvaloniaList`1 class.
Methods
- Add(`0) virtual Adds an item to the collection.
-
Add
Range(IEnumerable<`0>) virtual Adds multiple items to the collection. - Clear() virtual Removes all items from the collection.
- Contains(`0) sealed Tests if the collection contains the specified item.
-
Copy
To(`0[], sealed Copies the collection's contents to an array.Int32) -
Get
Enumerator() sealed Returns an enumerator that enumerates the items in the collection. -
Get
Range(Int32, Gets a range of items from the collection.Int32) -
Index
Of(`0) sealed Gets the index of the specified item in the collection. -
Insert(Int32,
`0) virtual Inserts an item at the specified index. -
Insert
Range(Int32, virtual Inserts multiple items at the specified index.IEnumerable<`0>) -
Move(Int32,
Int32) sealed Moves an item to a new index. -
Move
Range(Int32, sealed Moves multiple items to a new index.Int32, Int32) - Remove(`0) virtual Removes an item from the collection.
-
Remove
All(IEnumerable<`0>) virtual Removes multiple items from the collection. -
Remove
At(Int32) virtual Removes the item at the specified index. -
Remove
Range(Int32, virtual Removes a range of elements from the collection.Int32)
Properties
- Count sealed Gets the number of items in the collection.
- Item sealed
-
Reset
Behavior Gets or sets the reset behavior of the list. -
System.
Collections. privatesealedGeneric. ICollection<T>. Is Read Only -
System.
Collections. privatesealedICollection. Count -
System.
Collections. privatesealedICollection. Is Synchronized -
System.
Collections. privatesealedICollection. Sync Root -
System.
Collections. privatesealedIList. Is Fixed Size -
System.
Collections. privatesealedIList. Is Read Only -
System.
Collections. privatesealedIList. Item - Validate Gets or sets a validation routine that can be used to validate items before they are added.
Events
-
Collection
Changed sealed Raised when a change is made to the collection's items. -
Property
Changed sealed Raised when a property on the collection changes.