Class FuncTemplate<TParam, TControl>
Creates a control from a Func<T, TResult>.
public class FuncTemplate<TParam, TControl> : ITemplate<TParam, TControl> where TControl : Control?
Type Parameters
TParam
The type of the parameter.
TControl
The type of control.
- Inheritance
-
FuncTemplate<TParam, TControl>
- Implements
-
ITemplate<TParam, TControl>
- Derived
- Inherited Members
Constructors
FuncTemplate(Func<TParam, INameScope, TControl>)
Initializes a new instance of the FuncTemplate<TParam, TControl> class.
public FuncTemplate(Func<TParam, INameScope, TControl> func)
Parameters
func
Func<TParam, INameScope, TControl>The function used to create the control.
Methods
Build(TParam)
Creates the control.
public TControl Build(TParam param)
Parameters
param
TParamThe parameter.
Returns
- TControl
The created control.
BuildWithNameScope(TParam)
protected (TControl control, INameScope nameScope) BuildWithNameScope(TParam param)
Parameters
param
TParam
Returns
- (TControl control, INameScope nameScope)