FindByName(Visual, String) Method

Definition

Assembly HeadlessTestingFramework.dll

Finds a control by its Name property with a specific type.

public static T? FindByName<T>(this Visual root, string name)
    where T : Control

Type parameters

T
The expected type of the control.

Parameters

root
Avalonia.Visual

The root visual to search from.

name
String

The name to search for.

Returns

{T}
The control with the specified name and type, or null if not found.