TreeContainerIndex Class

Summary

Maintains an index of all item containers currently materialized by a TreeView.
Namespace
Avalonia.Controls.Generators
Base Types
  • object
graph BT Type-->Base0["object"] Type["TreeContainerIndex"] class Type type-node

Syntax

public class TreeContainerIndex

Remarks

Each TreeViewItem has its own TreeItemContainerGenerator<T> that maintains the list of its direct children, but they also share an instance of this class in their Index property which tracks the containers materialized for the entire tree.

Events

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

Properties

Name Value Summary
Containers IEnumerable<IControl>
Gets the currently materialized containers.
Items IEnumerable<object>
Gets the items of currently materialized containers.

Methods

Name Value Summary
Add(object, IControl) void
Adds an entry to the index.
ContainerFromItem(object) IControl
Gets the container for an item.
ItemFromContainer(IControl) object
Gets the item for a container.
Remove(IControl) void
Removes a container from the index.
Remove(int, IEnumerable<ItemContainerInfo>) void
Removes a set of containers from the index.