diff --git a/src/Perspex.Controls/Window.cs b/src/Perspex.Controls/Window.cs index 9c379d1722..a2053ab33e 100644 --- a/src/Perspex.Controls/Window.cs +++ b/src/Perspex.Controls/Window.cs @@ -47,19 +47,19 @@ namespace Perspex.Controls /// public class Window : TopLevel, IStyleable, IFocusScope, ILayoutRoot, INameScope { - private static IList windows = new List(); + private static IList s_windows = new List(); /// /// Retrieves an enumeration of all Windows in the currently running application. /// Can only be accessed from the UI Thread. /// - public static IEnumerable Windows + public static IList OpenWindows { get { Dispatcher.UIThread.VerifyAccess(); - return windows; + return s_windows; } } @@ -172,7 +172,7 @@ namespace Perspex.Controls /// public void Close() { - windows.Remove(this); + s_windows.Remove(this); PlatformImpl.Dispose(); } @@ -213,7 +213,7 @@ namespace Perspex.Controls /// public void Show() { - windows.Add(this); + s_windows.Add(this); LayoutManager.Instance.ExecuteInitialLayoutPass(this); @@ -245,7 +245,7 @@ namespace Perspex.Controls /// public Task ShowDialog() { - windows.Add(this); + s_windows.Add(this); LayoutManager.Instance.ExecuteInitialLayoutPass(this);