GetControl<T> Method
Finds the named control in the scope of the specified control and throws if not found.
Definition
Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
public static T GetControl<T>(
this Control control,
string name
)
where T : Control
<ExtensionAttribute>
Public Shared Function GetControl(Of T As Control) (
control As Control,
name As String
) As T
[<ExtensionAttribute>]
static member GetControl :
control : Control *
name : string -> 'T when 'T : Control
Parameters
Type Parameters
- The type of the control to find.
Return Value
T
The control.
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).