DesktopWindowOwner class

Namespace Runic.Desktop in Runic.Desktop 0.23.0

public sealed class DesktopWindowOwner

The window a new Desktop window belongs to (DesktopWindowOptions.Owner): another DesktopWindow, or a native window of the same toolkit, such as a WPF window.

Remarks

Create it with DesktopWindowOwner.FromWindow for a Runic Desktop window, or with DesktopWindowOwner.FromNativeHandle for a window of another framework in the same process. The handle is read when the owned window opens.

Properties

Window

public DesktopWindow? Window { get; }

The Runic Desktop window that owns, or null for a native owner.

Methods

FromNativeHandle

public static DesktopWindowOwner FromNativeHandle(nint handle)

An owner that is a native window of another framework in this process: an HWND on Windows (for WPF, new WindowInteropHelper(window).Handle), an NSWindow* on macOS, and a GtkWindow* of the GTK version the Linux backend uses.

Parameters

handle

The native window handle. It must stay valid while the owned window is open.

Exceptions

ArgumentException

handle is zero.

Remarks

Runic Desktop does not track a native owner: closing or hiding it does not close or hide the owned window, as it does for a DesktopWindow owner.

FromWindow

public static DesktopWindowOwner FromWindow(DesktopWindow window)

An owner that is a Runic Desktop window.

Parameters

window

The owner. It must be an open embedded window when the owned window opens.