等待 WPF 组合框填充时出现 COMException
所以还有一个与此类似的问题,但我认为这有点不同。这是一笔交易,我正在开发一个应用程序,其中有一系列组合框,用户进行选择,然后填充下一个组合框。它有效,但我看到了很多这样的错误。
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 mscorlib.dll 中发生了“System.Runtime.InteropServices.COMException”类型的第一次机会异常 “System.Runtime.InteropServices.COMException”类型的第一次机会异常
我为所有组合框设置了这样的项目面板模板。
<ItemsPanelTemplate x:Key="VirtualizingItemsPanelTemplate">
<VirtualizingStackPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
我还能做些什么来避免出现此错误吗?它似乎导致速度有点慢(我不会放弃称之为冻结 - 这太串了一个术语),但这个屏幕在使用方面将具有超高价值,我想将其保持为尽可能响应。
有人有什么建议吗?
谢谢!
So there is another question similar to this but I think this is a little different. Here is a the deal, I am working on an app where there is a series of combo boxes right, the user makes a selection and then the next combo box populates. It works but I see a bunch of these errors.
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException'
I have my items panel template set like this for all of the combo boxes.
<ItemsPanelTemplate x:Key="VirtualizingItemsPanelTemplate">
<VirtualizingStackPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
Is there anything else I can do to try to not get this error? It seems to be causing a bit of a slow down (I wouldn't quit call it freezing up - that is too string a term) but this screen is going to be super high value in terms of usage and I want to keep it as responsive as possible.
Anyone got any suggestions?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有同样的问题,根据我的发现,问题出在 Visual Studio 调试器的处理上。
与调试器分开构建和运行的应用程序不会遇到延迟。
在微软修复他们的调试器/VS 之前,这只是一个半解决方案。
I have the same problem, and from what I have found, the issue is dealing with the Visual Studio Debugger.
Applications that are built and ran separately from the debugger will not experience the delay.
It is a half-solution until Microsoft fixes their debugger/VS.