WPF System.ComponentModel.Win32Exception(0x80004005):窗口句柄无效

我在WPF上收到以下错误。 我在Window上使用MVVM数据绑定到DataContext + CollectionViewSources。 视图模型和视图中有太多代码要发布,但我想知道在哪里找到它,因为没有行号出现。

窗口正在使用带转换器的WPF数据绑定,其中还有一些Telerik控件。

这是在打电话之后

TabItemSelectionEditor.UpdateLayout() 

TabItemSelectionEditor是一个System.Windows.Control.TabItem

System.ComponentModel.Win32Exception(0x80004005):窗口句柄无效

在MS.Win32.UnsafeNativeMethods.GetWindowText(HandleRef hWnd,StringBuilder lpString,Int32 nMaxCount)

在System.Windows.Automation.Peers.WindowAutomationPeer.GetNameCore()

在System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

在System.Windows.ContextLayoutManager.fireAutomationEvents()

在System.Windows.ContextLayoutManager.UpdateLayout()

在System.Windows.UIElement.UpdateLayout()

在System.Windows.Controls.VirtualizingStackPanel。 c_ DisplayClassb.b _7()

在System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调,对象args,Int32 numArgs)

在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate方法,Object args,Int32 numArgs,Delegate catchHandler)

内部例外不算什么!

您的代码中没有DisplayClass方法吗?

我还可以看到有一个涉及VirtualizingStackPanel并且在它的子UIElement.UpdateLayout()上调用UIElement.UpdateLayout()方法时发生了错误。

这就是我可以从这个错误中解决的所有问题,而且没有任何更多的信息,我不能再帮助了。