FindByName(Visual, String) Method

Definition

Assembly HeadlessTestingFramework.dll

Finds a control by its Name property in the visual tree.

public static Control? FindByName(this Visual root, string name)

Parameters

root
Avalonia.Visual

The root visual to search from.

name
String

The name to search for.

Returns

Avalonia.Controls.Control
The control with the specified name, or null if not found.