InvalidOperationException: 在 Window 关闭时,无法将 Visibility 设置为 Visible,也无法调用 Show、ShowDialog、Close 或 WindowInteropHelper.EnsureHandle。 StackTrace: 在 System.Windows.Window.VerifyNotClosing() 在 System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel) 在 DynamicClass.WindowStateSynchronizer.<>c__DisplayClass5.<HandleWindowEvent>b__4() 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback) 在 DynamicClass.WindowMonitor.WinEventProc(IntPtr hWinEventHook, UInt32 eventType, IntPtr hwnd, Int32 idObject, Int32 idChild, UInt32 dwEventThread, UInt32 dwmsEventTime)