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

Der*_*nch 7 c# wpf

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

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

这是在打电话之后

TabItemSelectionEditor.UpdateLayout() 
Run Code Online (Sandbox Code Playgroud)

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)

内部例外不算什么!

She*_*dan 0

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

我还可以看到,当它在其子级上VirtualizingStackPanel调用该方法时,发生了错误。UIElement.UpdateLayout()

这就是我从这个错误中可以解决的所有问题,如果没有任何更多信息,我无法提供任何进一步的帮助。