Class FuncTreeDataTemplate<T>
A template used to build hierarchical data.
public class FuncTreeDataTemplate<T> : FuncTreeDataTemplate, IRecyclingDataTemplate, ITreeDataTemplate, IDataTemplate, ITemplate<object?, Control?>
Type Parameters
T
The type of the template's data.
- Inheritance
-
FuncTreeDataTemplate<T>
- Implements
- Inherited Members
Constructors
FuncTreeDataTemplate(Func<T, INameScope, Control>, Func<T, IEnumerable>)
Initializes a new instance of the FuncTreeDataTemplate<T> class.
public FuncTreeDataTemplate(Func<T, INameScope, Control> build, Func<T, IEnumerable> itemsSelector)
Parameters
build
Func<T, INameScope, Control>A function which when passed an object of
T
returns a control.itemsSelector
Func<T, IEnumerable>A function which when passed an object of
T
returns the child items.
FuncTreeDataTemplate(Func<T, bool>, Func<T, INameScope, Control>, Func<T, IEnumerable>)
Initializes a new instance of the FuncTreeDataTemplate<T> class.
public FuncTreeDataTemplate(Func<T, bool> match, Func<T, INameScope, Control> build, Func<T, IEnumerable> itemsSelector)
Parameters
match
Func<T, bool>A function which determines whether the data template matches the specified data.
build
Func<T, INameScope, Control>A function which when passed a matching object returns a control.
itemsSelector
Func<T, IEnumerable>A function which when passed a matching object returns the child items.