Skip to main content

UpdateChild Method

Updates the Child control based on the control's Content.

Definition​

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

public void UpdateChild()

Remarks​

Usually the Child control is created automatically when ApplyTemplate() is called; however for this to happen, the control needs to be attached to a logical tree (if the control is not attached to the logical tree, it is reasonable to expect that the DataTemplates needed for the child are not yet available). This method forces the Child control's creation at any point, and is particularly useful in unit tests.

See Also​

Reference​

ContentPresenter Class
Avalonia.Controls.Presenters Namespace