ItemContainerGeneratorCreateContainer Method
Creates a new container control.
Namespace: Avalonia.Controls.GeneratorsAssembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public Control CreateContainer(
Object? item,
int index,
Object? recycleKey
)
Public Function CreateContainer (
item As Object,
index As Integer,
recycleKey As Object
) As Control
member CreateContainer :
item : Object *
index : int *
recycleKey : Object -> Control
- item Object
- The item to display.
- index Int32
- The index of the item.
- recycleKey Object
-
The recycle key returned from NeedsContainer(Object, Int32, Object)
ControlThe newly created container control.
Before calling this method,
NeedsContainer(Object, Int32, Object)
should be called to determine whether the item itself should be used as a container.
After calling this method,
PrepareItemContainer(Control, Object, Int32)
must be called to prepare the container to display the specified item.
If the panel supports recycling then the returned recycle key should be stored alongside
the container and when container becomes eligible for recycling the container should
be placed in a recycle pool using this key. If the returned recycle key is null then
the container cannot be recycled.