VS2010 - 使用线程时Wpf编辑器崩溃

时间:2011-02-21 17:45:21

标签: wpf multithreading visual-studio-2010

有没有办法在设计器中禁用wpf表单加载?

每当我在我的应用程序中放置启动单独线程的控件时,wpf编辑器在加载时会崩溃我的visual studio。

我设法通过忽略vs2010错误弹出窗口继续使用wpf,但这非常烦人。

错误消息是:

Process Name:   devenv.exe : C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe    
Process Architecture:   x86
Exception Code: 0xC0000005
Exception Information:  The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information:   Not Present

1 个答案:

答案 0 :(得分:4)

您需要修改控件以检查它们是否处于设计模式,如果是,则不要执行任何操作。

您应该查看DesignerProperties.GetIsInDesignMode(this)

相关问题