In This Article

TopLevelExtensions Class

Provides extension methods for the Avalonia.Controls.TopLevel type.

public static class TopLevelExtensions
Inheritance:
object object

Methods

GetFocusedElement(TopLevel?)

Returns the currently-focused element for the given root.

public static IInputElement? GetFocusedElement(this TopLevel? topLevel)
Parameter Type Description
topLevel TopLevel

Returns

IInputElement

See Also

GetFocusedElementAsync(TopLevel?)

Returns a task whose result is the currently-focused element for the given root.

public static Task<IInputElement?> GetFocusedElementAsync(this TopLevel? topLevel)
Parameter Type Description
topLevel TopLevel

Returns

Task<IInputElement>

See Also

Inherited Members