我在WPF上遇到了以下错误。
我在窗口上使用MVVM数据绑定到DataContext + CollectionViewSources。
由于ViewModel和View中的代码太多,无法贴出,请问应该从哪里查找此错误,因为没有行号显示。
该窗口使用带有转换器的WPF数据绑定,并且其中还有一些Telerik控件。
这是在调用后发生的错误。
TabItemSelectionEditor.UpdateLayout()
TabItemSelectionEditor是一个System.Windows.Control.TabItem
System.ComponentModel.Win32Exception (0x80004005): 无效的窗口句柄
at MS.Win32.UnsafeNativeMethods.GetWindowText(HandleRef hWnd, StringBuilder lpString, Int32 nMaxCount)
at System.Windows.Automation.Peers.WindowAutomationPeer.GetNameCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Controls.VirtualizingStackPanel.<>c_DisplayClassb.b_7()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
内部异常为空!