Skip to main content

PrepareItemContainer Method

Prepares the specified element as the container for the corresponding item.

Definition

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

public void PrepareItemContainer(
Control container,
Object? item,
int index
)

Parameters

  Control
The element that's used to display the specified item.
  Object
The item to display.
  Int32
The index of the item to display.

Remarks

If NeedsContainer(Object, Int32, Object) is false for an item, then this method must only be called a single time; otherwise this method must be called after the container is created, and each subsequent time the container is recycled to display a new item.

See Also

Reference

ItemContainerGenerator Class
Avalonia.Controls.Generators Namespace