ItemContainerGenerator Class


Creates containers for items and maintains a list of created containers.
Base Types
  • object
Derived Types
graph TD Base0["object"]-->Type Interface0["IItemContainerGenerator"]-.->Type click Interface0 "/api/Avalonia.Controls.Generators/IItemContainerGenerator" Type["ItemContainerGenerator"] class Type type-node Type-->Derived0["ItemContainerGenerator<T>"] click Derived0 "/api/Avalonia.Controls.Generators/ItemContainerGenerator_1"


public class ItemContainerGenerator : IItemContainerGenerator


Name Summary
ItemContainerGenerator(IControl) Initializes a new instance of the ItemContainerGenerator class.


Name Type Summary
Dematerialized EventHandler<ItemContainerEventArgs>
Event raised whenever containers are dematerialized.
Materialized EventHandler<ItemContainerEventArgs>
Signaled whenever new containers are materialized.
Recycled EventHandler<ItemContainerEventArgs>
Event raised whenever containers are recycled.


Name Value Summary
Containers IEnumerable<ItemContainerInfo>
Gets the currently realized containers.
ContainerType Type
Gets the ContainerType, or null if its an untyped ContainerGenerator.
ItemTemplate IDataTemplate
Gets or sets the data template used to display the items in the control.
Owner IControl
Gets the owner control.


Name Value Summary
Clear() IEnumerable<ItemContainerInfo>
Clears all created containers and returns the removed controls.
ContainerFromIndex(int) IControl
Gets the container control representing the item with the specified index.
CreateContainer(object) IControl
Creates the container for an item.
Dematerialize(int, int) IEnumerable<ItemContainerInfo>
Removes a set of created containers.
GetContainerRange(int, int) IEnumerable<ItemContainerInfo>
Gets all containers with an index that fall within a range.
IndexFromContainer(IControl) int
Gets the index of the specified container control.
InsertSpace(int, int) void
Inserts space for newly inserted containers in the index.
Materialize(int, object, IMemberSelector) ItemContainerInfo
Creates a container control for an item.
MoveContainer(int, int, object) ItemContainerInfo
Moves a container.
RaiseRecycled(ItemContainerEventArgs) void
Raises the Recycled event.
RemoveRange(int, int) IEnumerable<ItemContainerInfo>
Removes a set of created containers and updates the index of later containers to fill the gap.
TryRecycle(int, int, object, IMemberSelector) bool