Skip to main content

IndexFromContainer Method

Returns the index to the item that has the specified, generated container.

Definition​

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

public int IndexFromContainer(
Control container
)

Parameters​

  Control
The generated container to retrieve the item index for.

Return Value​

Int32
The index to the item that corresponds to the specified generated container, or -1 if container is not found.

See Also​

Reference​

ItemsControl Class
Avalonia.Controls Namespace