Skip to main content

Build(Object, Control) Method

Creates or recycles a control to display the specified data.

Definition​

Namespace: Avalonia.Controls.Templates
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

Control? Build(
Object? data,
Control? existing
)
View Source

Parameters​

  Object
The data to display.
  Control
An optional control to recycle.

Return Value​

Control
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.

See Also​

Reference​

IRecyclingDataTemplate Interface
Build Overload
Avalonia.Controls.Templates Namespace