NameScopeExtensionsGetT(ILogical, String) Method

Gets a named element from an INameScope or throws if no element of the requested name was found.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static T Get<T>(
	this ILogical anchor,
	string name
)
where T : class

Parameters

anchor  ILogical
The control to take the name scope from.
name  String
The name.

Type Parameters

T
The element type.

Return Value

T
The named element.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ILogical. 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