private static ObservableCollection <ExtendedSystemWindow> GetAllToplevelWindows()
        {
            lock (_windowsLock)
            {
                ObservableCollection <ExtendedSystemWindow> replacedWindows = new ObservableCollection <ExtendedSystemWindow>();
                var allWindows = SystemWindow.AllToplevelWindows.Where((w) => w.Visible && w.Title != "").
                                 ToList().ConvertAll <ExtendedSystemWindow>((w) => new ExtendedSystemWindow(w.HWnd));

                foreach (var w in allWindows)
                {
                    ExtendedSystemWindow existingWindow = null;
                    if ((existingWindow = Windows.FirstOrDefault((esw) => esw.HWnd == w.HWnd)) != null)
                    {
                        w.CopyFrom(existingWindow);
                    }
                    replacedWindows.Add(w);
                }

                return(replacedWindows);
            }
        }
 public void CopyFrom(ExtendedSystemWindow wnd)
 {
     this.RestoreMaximized = wnd.RestoreMaximized;
 }