Exception:在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。

报错信息 1
InvalidOperationException: 在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。
StackTrace:
   在 System.Windows.Window.VerifyNotClosing()
   在 System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
   在 System.EventHandler.Invoke(Object sender, EventArgs e)
   在 System.Windows.Window.OnDeactivated(EventArgs e)
   在 System.Windows.Window.HandleActivate(Boolean windowActivated)
   在 System.Windows.Window.WmActivate(IntPtr wParam)
   在 System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.42.30 2024-04-27 00:06 Microsoft Windows NT 10.0.22621.0
报错信息 2
InvalidOperationException: 在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。
StackTrace:
   在 System.Windows.Window.VerifyNotClosing()
   在 System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
   在 System.Windows.Window.OnDeactivated(EventArgs e)
   在 System.Windows.Window.HandleActivate(Boolean windowActivated)
   在 System.Windows.Window.WmActivate(IntPtr wParam)
   在 System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.42.33 2024-04-23 12:31 Microsoft Windows NT 10.0.22631.0
版本:1.42.32 2024-04-21 22:22 Microsoft Windows NT 10.0.19045.0
版本:1.42.24 2024-04-17 20:08 Microsoft Windows NT 10.0.19045.0
版本:1.42.24 2024-04-17 11:12 Microsoft Windows NT 10.0.22631.0
版本:1.42.8 2024-04-11 00:36 Microsoft Windows NT 10.0.22631.0
版本:1.42.24 2024-04-10 11:59 Microsoft Windows NT 10.0.22631.0
版本:1.42.24 2024-04-09 17:02 Microsoft Windows NT 6.1.7601 Service Pack 1
版本:1.42.24 2024-04-09 08:00 Microsoft Windows NT 10.0.19045.0
版本:1.42.8 2024-03-30 22:00 Microsoft Windows NT 10.0.19045.0
版本:1.42.24 2024-03-29 01:35 Microsoft Windows NT 10.0.19045.0
版本:1.42.15 2024-03-28 18:06 Microsoft Windows NT 10.0.19045.0
报错信息 3
InvalidOperationException: 在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。
StackTrace:
   在 System.Windows.Window.VerifyNotClosing()
   在 System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
   在 System.Windows.Application.DoShutdown()
   在 System.Windows.Application.ShutdownImpl()
   在 System.Windows.Application.ShutdownCallback(Object arg)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.42.22 2024-04-14 02:28 Microsoft Windows NT 10.0.18363.0
版本:1.42.24 2024-04-10 23:18 Microsoft Windows NT 10.0.22631.0
版本:1.42.23 2024-04-10 14:49 Microsoft Windows NT 10.0.22621.0