ItemCollectionAdd Method

Adds an item to the ItemsControl.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public int Add(
	Object? value
)

Parameters

value  Object
The item to add to the collection.

Return Value

Int32
The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection.

Exceptions

InvalidOperationException The collection is in ItemsSource mode.

See Also