IndexOutOfRangeException: 索引超出了数组界限。 StackTrace: 在 System.Collections.Generic.List`1.get_Item(Int32 index) 在 System.Windows.ResourceDictionary.GetBamlObjectFactory(Object key) 在 System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean canCacheAsThemeResource, Boolean& canCache) 在 System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source) 在 System.Windows.ResourceReferenceExpression.GetRawValue(DependencyObject d, Object& source, DependencyProperty dp) 在 System.Windows.ResourceReferenceExpression.GetValue(DependencyObject d, DependencyProperty dp) 在 System.Windows.DependencyObject.EvaluateExpression(EntryIndex entryIndex, DependencyProperty dp, Expression expr, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry) 在 System.Windows.DependencyObject.EvaluateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, OperationType operationType) 在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 在 System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue) 在 System.Windows.ResourceReferenceExpression.InvalidateExpressionValue(Object sender, EventArgs e) 在 System.Windows.TreeWalkHelper.InvalidateResourceReferences(DependencyObject d, ResourcesChangeInfo info) 在 System.Windows.TreeWalkHelper.OnResourcesChanged(DependencyObject d, ResourcesChangeInfo info, Boolean raiseResourceChangedEvent) 在 System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState) 在 System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree) 在 System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree) 在 MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree) 在 System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren) 在 System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren) 在 System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d) 在 System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode) 在 MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode) 在 System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation) 在 System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent) 在 System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent) 在 System.Windows.Media.Visual.RemoveVisualChild(Visual child) 在 System.Windows.Media.VisualCollection.DisconnectChild(Int32 index) 在 System.Windows.Media.VisualCollection.RemoveRange(Int32 index, Int32 count) 在 System.Windows.Controls.UIElementCollection.RemoveRangeInternal(Int32 index, Int32 count) 在 System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args) 在 System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args) 在 System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex) 在 System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) 在 System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType) 在 System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) 在 System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) 在 System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) 在 System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType) 在 System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) 在 System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) 在 MS.Internal.Controls.InnerItemCollectionView._RemoveAt(Int32 index, Int32 indexR, Object item) 在 System.Windows.Controls.ItemCollection.Remove(Object removeItem) 在 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()