Table of Contents

Class FuncTemplate<TControl>

Namespace
Avalonia.Controls.Templates
Assembly
Avalonia.Controls.dll

Creates a control from a Func<TResult>.

public class FuncTemplate<TControl> : ITemplate<TControl>, ITemplate where TControl : Control?

Type Parameters

TControl

The type of control.

Inheritance
FuncTemplate<TControl>
Implements
ITemplate<TControl>
Inherited Members

Constructors

FuncTemplate(Func<TControl>)

Initializes a new instance of the FuncTemplate<TControl> class.

public FuncTemplate(Func<TControl> func)

Parameters

func Func<TControl>

The function used to create the control.

Methods

Build()

Creates the control.

public TControl Build()

Returns

TControl

The created control.