Skip to main content

NeedsContainer Method

Determines whether the specified item needs to be wrapped in a container control.

Definition

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

public bool NeedsContainer(
Object? item,
int index,
out Object?? recycleKey
)

Parameters

  Object
The item to display.
  Int32
The index of the item.
  Object
When the method returns, contains a key that can be used to locate a previously recycled container of the correct type, or null if the item cannot be recycled.

Return Value

Boolean
true if the item needs a container; otherwise false if the item can itself be used as a container.

See Also

Reference

ItemContainerGenerator Class
Avalonia.Controls.Generators Namespace