private static bool HasOwner(SystemWindow window) { return ((window.Owner != null) || (new WindowInteropHelper(window).Owner != IntPtr.Zero)); }