Class TreeListFlatten
Lays a nested tree out as the flat row list a TreeListVirtual draws. A port of
the web registry's flattenTree.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public static class TreeListFlatten
Methods
Flatten<T>(TreeListFlattenOptions<T>)
Walks a lazily loaded tree through its expansion state and lays it out as the flat, ordered row list a windowed tree renders.
Declaration
public static FlattenedTree<T> Flatten<T>(TreeListFlattenOptions<T> options)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeListFlattenOptions<T> | options | How to read the tree. |
Returns
| Type | Description |
|---|---|
| FlattenedTree<T> | The rows, the open levels and the levels still to load. |
Type Parameters
| Name | Description |
|---|---|
| T | The caller's item type. |
Remarks
An id is emitted at most once. A cache refreshed one level at a time can briefly hold an item under its old and its new parent after a move, or even a cycle, and a duplicate row would collide with its own id.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | A required option is missing. |