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)
   在 DynamicClass.<>c__DisplayClassb.<Exec>b__7()
   在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
   在 System.Windows.Threading.Dispatcher.Invoke(Action callback)
   在 DynamicClass.<>c__DisplayClassb.<Exec>b__6(Object s, CancelEventArgs e)
   在 System.ComponentModel.CancelEventHandler.Invoke(Object sender, CancelEventArgs e)
   在 System.Windows.Window.OnClosing(CancelEventArgs e)
   在 System.Windows.Window.WmClose()
   在 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.44.22 2025-12-03 13:14 Microsoft Windows NT 10.0.26100.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.44.46 2025-11-27 10:44 Microsoft Windows NT 10.0.26200.0
版本:1.44.32 2025-11-25 10:24 Microsoft Windows NT 10.0.26100.0
版本:1.44.31 2025-11-19 10:22 Microsoft Windows NT 10.0.26100.0
版本:1.44.22 2025-11-14 16:10 Microsoft Windows NT 10.0.19044.0
版本:1.44.22 2025-11-14 08:42 Microsoft Windows NT 10.0.19045.0
版本:1.44.22 2025-11-13 17:47 Microsoft Windows NT 10.0.26100.0
版本:1.44.22 2025-11-13 17:16 Microsoft Windows NT 10.0.19045.0
版本:1.44.31 2025-11-13 11:53 Microsoft Windows NT 10.0.26100.0
版本:1.44.22 2025-11-13 11:44 Microsoft Windows NT 10.0.19045.0
版本:1.44.22 2025-11-13 01:19 Microsoft Windows NT 10.0.19044.0
版本:1.44.31 2025-11-12 22:11 Microsoft Windows NT 10.0.22631.0
版本:1.44.22 2025-11-12 21:46 Microsoft Windows NT 10.0.26100.0
版本:1.44.32 2025-11-12 19:30 Microsoft Windows NT 10.0.22631.0
版本:1.44.31 2025-11-12 17:11 Microsoft Windows NT 10.0.26100.0
版本:1.44.22 2025-11-12 17:05 Microsoft Windows NT 10.0.19045.0
版本:1.44.32 2025-11-12 16:31 Microsoft Windows NT 10.0.26200.0
版本:1.44.22 2025-11-12 16:31 Microsoft Windows NT 10.0.19045.0
版本:1.44.32 2025-11-12 15:54 Microsoft Windows NT 10.0.22635.0
版本:1.44.27 2025-11-12 13:58 Microsoft Windows NT 10.0.19044.0
版本:1.44.32 2025-11-12 10:33 Microsoft Windows NT 10.0.19045.0
版本:1.44.31 2025-11-12 10:12 Microsoft Windows NT 10.0.26100.0
版本:1.44.32 2025-11-12 09:38 Microsoft Windows NT 10.0.26200.0
版本:1.41.5 2025-11-11 13:59 Microsoft Windows NT 10.0.22000.0
版本:1.44.22 2025-11-11 12:49 Microsoft Windows NT 10.0.19045.0
版本:1.44.31 2025-11-11 11:09 Microsoft Windows NT 10.0.22621.0
版本:1.44.22 2025-11-11 10:03 Microsoft Windows NT 10.0.26200.0
版本:1.44.32 2025-11-11 09:52 Microsoft Windows NT 10.0.22631.0
版本:1.44.22 2025-11-11 09:28 Microsoft Windows NT 10.0.19045.0
版本:1.44.22 2025-11-11 09:25 Microsoft Windows NT 10.0.26100.0
版本:1.44.32 2025-11-10 21:07 Microsoft Windows NT 10.0.26100.0
版本:1.44.32 2025-11-10 17:43 Microsoft Windows NT 10.0.26200.0
版本:1.44.32 2025-11-10 17:39 Microsoft Windows NT 10.0.19045.0
版本:1.44.22 2025-11-07 15:27 Microsoft Windows NT 10.0.22621.0
报错信息 3
InvalidOperationException: 在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。
StackTrace:
   在 System.Windows.Window.VerifyNotClosing()
   在 System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
   在 DynamicClass.CircularWindow.<>c__DisplayClassb.<OnWindowLoaded>b__4(Object s, 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.44.31 2025-11-14 14:38 Microsoft Windows NT 10.0.18363.0
报错信息 4
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.44.22 2025-11-07 20:11 Microsoft Windows NT 10.0.19041.0
报错信息 5
InvalidOperationException: 在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。
StackTrace:
   在 System.Windows.Window.VerifyNotClosing()
   在 System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
   在 System.ComponentModel.CancelEventHandler.Invoke(Object sender, CancelEventArgs e)
   在 System.Windows.Window.OnClosing(CancelEventArgs e)
   在 System.Windows.Window.WmClose()
   在 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.44.25 2025-11-07 00:46 Microsoft Windows NT 10.0.26100.0