void UnsubscribeWindow(WindowBase window)
        {
            window.Activated -= OnWindowActivated;
#if !SILVERLIGHT
            window.Deactivated -= OnWindowDeactivated;
#endif
            window.Closed -= OnWindowClosed;
        }
            void HideWindow(WindowBase window)
            {
#if !SILVERLIGHT
                window.Hide();
#else
                window.Closed -= window_Closed;
                window.Hide();
                window.Closed += window_Closed;
#endif
            }