Class FuncDataTemplate<T>
Builds a control for a piece of data of specified type.
public class FuncDataTemplate<T> : FuncDataTemplate, IRecyclingDataTemplate, IDataTemplate, ITemplate<object?, Control?>
Type Parameters
T
The type of the template's data.
- Inheritance
-
FuncDataTemplate<T>
- Implements
- Inherited Members
Constructors
FuncDataTemplate(Func<T, INameScope, Control?>, bool)
Initializes a new instance of the FuncDataTemplate<T> class.
public FuncDataTemplate(Func<T, INameScope, Control?> build, bool supportsRecycling = false)
Parameters
build
Func<T, INameScope, Control>A function which when passed an object of
T
returns a control.supportsRecycling
boolWhether the control can be recycled.
FuncDataTemplate(Func<T, bool>, Func<T, Control>, bool)
Initializes a new instance of the FuncDataTemplate<T> class.
public FuncDataTemplate(Func<T, bool> match, Func<T, Control> build, bool supportsRecycling = false)
Parameters
match
Func<T, bool>A function which determines whether the data template matches the specified data.
build
Func<T, Control>A function which when passed an object of
T
returns a control.supportsRecycling
boolWhether the control can be recycled.
FuncDataTemplate(Func<T, bool>, Func<T, INameScope, Control>, bool)
Initializes a new instance of the FuncDataTemplate<T> class.
public FuncDataTemplate(Func<T, bool> match, Func<T, INameScope, Control> build, bool supportsRecycling = false)