Skip to main content

NeedsContainer<T> Method

A default implementation of NeedsContainerOverride(Object, Int32, Object) that returns true and sets the recycle key to DefaultRecycleKey if the item is not a T .

Definition

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

protected bool NeedsContainer<T>(
Object? item,
out Object?? recycleKey
)
where T : Control

Parameters

  Object
The item.
  Object
When the method returns, contains DefaultRecycleKey if item is not of type T; otherwise null.

Type Parameters

The container type.

Return Value

Boolean
true if item is of type T; otherwise false.

See Also

Reference

ItemsControl Class
Avalonia.Controls Namespace