ItemContainerGeneratorPrepareItemContainer Method

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

Definition

Namespace: Avalonia.Controls.Generators
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public void PrepareItemContainer(
	Control container,
	Object? item,
	int index
)

Parameters

container  Control
The element that's used to display the specified item.
item  Object
The item to display.
index  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