Skip to main content

FindControl<T> Method

Finds the named control in the scope of the specified control.

Definition

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

public static T FindControl<T>(
this Control control,
string name
)
where T : Control

Parameters

  Control
The control to look in.
  String
The name of the control to find.

Type Parameters

The type of the control to find.

Return Value

T
The control or null if not found.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Control. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ControlExtensions Class
Avalonia.Controls Namespace