Exception:序列不包含任何元素

报错信息 1
InvalidOperationException: 序列不包含任何元素
StackTrace:
   在 System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
   在 DynamicClass.<Chat>d__35.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 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.42.32 2024-04-21 07:54 Microsoft Windows NT 10.0.19045.0
报错信息 2
InvalidOperationException: 序列不包含任何元素
StackTrace:
   在 System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   在 DynamicClass.<>c__DisplayClass28.<OnWindowCreated>b__10()
   在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.Controls.Primitives.TextBoxBase.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
   在 System.Windows.Controls.TextBox.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
   在 System.Windows.Documents.TextContainerChangedEventHandler.Invoke(Object sender, TextContainerChangedEventArgs e)
   在 System.Windows.Documents.TextContainer.EndChange(Boolean skipEvents)
   在 System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
   在 System.Windows.Documents.TextRange.ChangeBlock.System.IDisposable.Dispose()
   在 System.Windows.Controls.TextBox.OnTextPropertyChanged(String oldText, String newText)
   在 System.Windows.Controls.TextBox.OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   在 System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   在 System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   在 System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   在 System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   在 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.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   在 System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   在 System.Windows.Data.BindingExpression.Activate(Object item)
   在 System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   在 System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
   在 MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
   在 MS.Internal.Data.DataBindEngine.Run(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.42.25 2024-04-18 16:39 Microsoft Windows NT 10.0.19045.0
报错信息 3
InvalidOperationException: 序列不包含任何元素
StackTrace:
   在 System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
   在 DynamicClass.<Chat>d__32.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 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.42.24 2024-04-11 16:09 Microsoft Windows NT 10.0.19045.0
版本:1.42.25 2024-04-04 19:52 Microsoft Windows NT 10.0.19044.0