DragAndDrop core
This commit is contained in:
18
Lattice.Themes.Core/WindowTracker.cs
Normal file
18
Lattice.Themes.Core/WindowTracker.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user