WPFSystem.ComponentModel.Win32Exception(0x80004005):Thewindowhandleisinvalid我在WPF上收到以下错误。我在Window上使用MVVM数据绑定到DataContext+CollectionViewSources。视图模型和视图中的代码太多无法发布,但我想知道在哪里可以找到它,因为没有行号出现。该窗口使用带有转换器的WPF数据绑定,它也有一些Telerik控件。这是在调用TabItemSelectionEditor.UpdateLayout()之后TabItemSelectionEditor是一个System.Windows.Control.TabItemSystem.ComponentModel.Win32Exception(0x80004005):ThewindowhandleisinvalidatMS.Win32.UnsafeNativeMethods.GetWindowText(HandleRefhWnd,StringBuilderlpString,Int32nMaxCount)在System.Windows.Automation.Peers.WindowAutomationPeer.GetNameCore()在System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()在System.Windows.ContextLayoutManager.fireAutomationEvents()在System.Windows.UIElement.UpdateLayout()在System.Windows.Controls.VirtualizingStackPanel。c_DisplayClassb.b_7()atSystem.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegatecallback,Objectargs,Int32numArgs)atMS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Objectsource,Delegatemethod,Objectargs,Int32numArgs,DelegatecatchHandler)内部异常不算什么!您的代码中没有DisplayClass方法吗?我还可以看到涉及VirtualizingStackPanel,并且在其子UIElement.UpdateLayout()上调用UIElement.UpdateLayout()方法时发生错误。这就是我可以从这个错误中解决的全部问题,没有任何更多信息,我无法再提供帮助。以上就是C#学习教程:WPFSystem.ComponentModel.Win32Exception(0x80004005):Thewindowhandleisinvalid。分享的全部内容,如果对大家有用,需要进一步了解C#学习教程,希望大家多多关注——本文来自网络收集,不代表立场,如涉及侵权请点击维权联系管理员删除。如需转载请注明出处:
