Skip to main content

ScreenFromTopLevel Method

Retrieves a Screen for the display that contains the specified TopLevel.

Definition

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

public Screen? ScreenFromTopLevel(
TopLevel topLevel
)

Parameters

  TopLevel
The top level for which to retrieve the Screen.

Return Value

Screen
The Screen.

Exceptions

ObjectDisposedExceptionTopLevel platform implementation was already disposed.

See Also

Reference

Screens Class
Avalonia.Controls Namespace