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.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.10 2025-06-12 21:02 Microsoft Windows NT 10.0.19045.0
版本:1.44.13 2025-06-08 21:39 Microsoft Windows NT 10.0.26100.0
版本:1.44.18 2025-06-06 12:52 Microsoft Windows NT 10.0.19041.0
版本:1.44.13 2025-05-28 21:29 Microsoft Windows NT 10.0.26100.0
版本:1.44.13 2025-05-26 13:27 Microsoft Windows NT 10.0.22631.0
版本:1.43.63 2025-05-19 16:25 Microsoft Windows NT 10.0.19045.0
版本:1.44.11 2025-05-19 14:17 Microsoft Windows NT 10.0.22631.0
版本:1.44.14 2025-05-14 18:03 Microsoft Windows NT 10.0.26100.0
版本:1.44.10 2025-05-14 15:39 Microsoft Windows NT 10.0.19045.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.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.10 2025-06-05 11:01 Microsoft Windows NT 10.0.26100.0
版本:1.43.60 2025-05-19 14:44 Microsoft Windows NT 10.0.26100.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.GlobalMouseHook.MouseHookCallback(Int32 nCode, IntPtr wParam, IntPtr lParam)

版本:1.44.10 2025-06-05 00:13 Microsoft Windows NT 10.0.26100.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.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.FrameworkElement.RaiseClrEvent(EventPrivateKey key, EventArgs args)
   在 System.Windows.Controls.Primitives.Popup.OnClosed(EventArgs e)
   在 System.Windows.Controls.Primitives.Popup.DestroyWindow()
   在 System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   在 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.13 2025-05-31 15:20 Microsoft Windows NT 10.0.19045.0