# 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.

```csharp
public class WindowManager : IDisposable, IWindowsManager
```

## Public Members

| name | description |
| --- | --- |
| [WindowManager](WindowManager/WindowManager.md)() | Initializes a new instance of the [`WindowManager`](./WindowManager.md) class and starts observing window opening, closing and activation across the application. Create a single instance at startup and keep it alive; call [`Dispose`](./WindowManager/Dispose.md) to stop observing. |
| [ActiveWindow](WindowManager/ActiveWindow.md) { 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](WindowManager/Dispose.md)() | Stops observing application windows and releases the event subscriptions taken by the constructor. |

## See Also

* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](./index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.ApplicationServices.dll -->
