Files
Lattice/Lattice.Themes.Core/WindowTracker.cs
2026-01-18 16:33:35 +03:00

19 lines
410 B
C#

using Microsoft.UI.Xaml;
namespace Lattice.Themes;
public static class WindowTracker
{
private static readonly List<Window> _windows = new();
public static IReadOnlyList<Window> Windows => _windows;
public static void Register(Window window)
{
if (!_windows.Contains(window))
_windows.Add(window);
window.Closed += (_, _) => _windows.Remove(window);
}
}