ItemContainerGenerator<T> Class

Summary

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