Exception:设置属性“System.Windows.Media.VisualBrush.Visual”时引发了异常。调用线程无法访问此对象,因为另一个线程拥有该对象。

报错信息

   在 System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   在 System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   在 System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   在 System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   在 ToastNotifications.Messages.Information.InformationMessage.CreateDisplayPart()
   在 ToastNotifications.Messages.Core.MessageBase`1.Configure()
   在 ToastNotifications.Messages.Core.MessageBase`1.get_DisplayPart()
   在 ToastNotifications.Display.NotificationsDisplaySupervisor.ShowNotification(INotification notification)
   在 ToastNotifications.Display.NotificationsDisplaySupervisor.InternalDisplayNotification(INotification notification)
   在 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)

调用线程无法访问此对象,因为另一个线程拥有该对象。
   在 System.Windows.Threading.Dispatcher.VerifyAccess()
   在 MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
   在 System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
   在 System.Windows.Media.VisualBrush.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.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   在 System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
   在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value) 

解决方法

暂无解决方案。

相关信息
2 查看
20天2小时前
Quicker版本
版本 反馈次数
1.38.31 1