InvalidOperationException: 关闭 Window 之后,无法设置 Visibility,也无法调用 Show、ShowDialogor 或 WindowInteropHelper.EnsureHandle。 StackTrace: 在 System.Windows.Window.VerifyCanShow() 在 System.Windows.Window.CoerceVisibility(DependencyObject d, Object value) 在 System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean skipBaseValueChecks) 在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 在 System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) 在 System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 在 ToastNotifications.Display.NotificationsWindow.<RecomputeLayout>b__7_0() 在 System.Windows.Threading.DispatcherOperation.InvokeDelegateCore() 在 System.Windows.Threading.DispatcherOperation.InvokeImpl() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority) 在 ToastNotifications.Display.NotificationsDisplaySupervisor.<>c__DisplayClass18_0.<CloseNotification>b__0() 在 System.Windows.Threading.DispatcherOperation.InvokeDelegateCore() 在 System.Windows.Threading.DispatcherOperation.InvokeImpl() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback) 在 ToastNotifications.Utilities.DelayAction.<>c__DisplayClass0_0.<Execute>b__0(Object obj) 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.TimerQueueTimer.CallCallback() 在 System.Threading.TimerQueueTimer.Fire() 在 System.Threading.TimerQueue.FireNextTimers()