Skip to main content

Insert Method

Inserts an element into the collection at the specified index.

Definition

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

public void Insert(
int index,
Object? value
)

Parameters

  Int32
The zero-based index at which to insert the item.
  Object
The item to insert.

Exceptions

InvalidOperationExceptionThe collection is in ItemsSource mode.

See Also

Reference

ItemCollection Class
Avalonia.Controls Namespace