FuncDataTemplate Class
Definition
Builds a control for a piece of data.
public class FuncDataTemplate
Constructors
| Name | Description |
|---|---|
| FuncDataTemplate (2 overloads) | No summary available. |
FuncDataTemplate overloads
FuncDataTemplate Constructor
public FuncDataTemplate(Func<object, bool> match, Func<object, Avalonia.Controls.INameScope, Avalonia.Controls.Control> build, bool supportsRecycling)
Parameters
match Func<object, bool>
build Func<object, Avalonia.Controls.INameScope, Avalonia.Controls.Control>
supportsRecycling bool
FuncDataTemplate Constructor
public FuncDataTemplate(Type type, Func<object, Avalonia.Controls.INameScope, Avalonia.Controls.Control> build, bool supportsRecycling)
Parameters
type Type
build Func<object, Avalonia.Controls.INameScope, Avalonia.Controls.Control>
supportsRecycling bool
Methods
| Name | Description |
|---|---|
| Build | Creates or recycles a control to display the specified data. |
| Match | Checks to see if this data template matches the specified data. |
Build Method
Creates or recycles a control to display the specified data.
public Avalonia.Controls.Control Build(object data, Avalonia.Controls.Control existing)
Parameters
data object
The data to display.
existing Avalonia.Controls.Control
An optional control to recycle.
Returns
The existing control if supplied and applicable to
data, otherwise a new control or null.
Remarks
The caller should ensure that any control passed to existing
originated from the same data template.
Match Method
Checks to see if this data template matches the specified data.
public bool Match(object data)
Parameters
data object
The data.
Returns
bool
True if the data template can build a control for the data, otherwise false.
Fields
| Name | Description |
|---|---|
| Access | The default data template used in the case where no matching data template is found but Avalonia.Controls.Primitives.AccessText should be used. |
| Default | The default data template used in the case where no matching data template is found. |
Access Field
The default data template used in the case where no matching data template is found but Avalonia.Controls.Primitives.AccessText should be used.
public Avalonia.Controls.Templates.FuncDataTemplate Access
Default Field
The default data template used in the case where no matching data template is found.
public Avalonia.Controls.Templates.FuncDataTemplate Default