ItemContainerGenerator<T> Class

Summary

Creates containers for items and maintains a list of created containers.
graph TD Base0["ItemContainerGenerator"]-->Type click Base0 "/api/Avalonia.Controls.Generators/ItemContainerGenerator" Base1["object"]-->Base0 Interface0["IItemContainerGenerator"]-.->Type click Interface0 "/api/Avalonia.Controls.Generators/IItemContainerGenerator" Type["ItemContainerGenerator<T>"] class Type type-node Type-->Derived0["TreeItemContainerGenerator<T>"] click Derived0 "/api/Avalonia.Controls.Generators/TreeItemContainerGenerator_1" Type-->Derived1["MenuItemContainerGenerator"] click Derived1 "/api/Avalonia.Controls.Generators/MenuItemContainerGenerator" Type-->Derived2["TabItemContainerGenerator"] click Derived2 "/api/Avalonia.Controls.Generators/TabItemContainerGenerator"

Syntax

public class ItemContainerGenerator<T> : ItemContainerGenerator, IItemContainerGenerator 
    where T : class, IControl, new()

Type Parameters

Name Description
T The type of the container.

Constructors

Events

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

Properties

Name Value Summary
Containers IEnumerable<ItemContainerInfo>
Gets the currently realized containers.
Inherited from ItemContainerGenerator
ContainerType Type
Gets the ContainerType, or null if its an untyped ContainerGenerator.
ContentProperty AvaloniaProperty
Gets the container's Content property.
ContentTemplateProperty AvaloniaProperty
Gets the container's ContentTemplate property.
ItemTemplate IDataTemplate
Gets or sets the data template used to display the items in the control.
Inherited from ItemContainerGenerator
Owner IControl
Gets the owner control.
Inherited from ItemContainerGenerator

Methods

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