Skip to content

WindowManager class

The default IWindowsManager implementation. It follows window activation to know which window is active, and disables the windows behind a modal dialog so that only the dialog can be interacted with — using the platform mechanism on Windows and X11 where one is available.

public class WindowManager : IDisposable, IWindowsManager

Public Members

name description
WindowManager() Initializes a new instance of the WindowManager class and starts observing window opening, closing and activation across the application. Create a single instance at startup and keep it alive; call Dispose to stop observing.
ActiveWindow { get; } The window a new dialog should be shown on top of: the currently active window, falling back to the application main window. null when the application has no window yet.
Dispose() Stops observing application windows and releases the event subscriptions taken by the constructor.

See Also