MVVM Light IsInDesignMode属性不起作用 [英] MVVM Light IsInDesignMode property not working

查看:309
本文介绍了MVVM Light IsInDesignMode属性不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,即在VS或Blend中运行解决方案时,属性IsInDesignMode无法返回预期的true值.我的环境包括Win Server 2008 R2,VS2010 Pro,Blend 4和MVVM Light V3.我在VS和Blend中以调试模式运行Silverlight 4解决方案,而IsInDesignMode始终为false.我是否缺少设置?是否有可能不适应环境的原因?预先感谢.

I'm having an issue where the property IsInDesignMode is not returning the expected value of true when running the solution in VS or Blend. My environment consists of Win Server 2008 R2, VS2010 Pro, Blend 4 and MVVM Light V3. I run my Silverlight 4 solution in Debug mode from VS and Blend, and IsInDesignMode is always false. Am I missing a setting? Is there a reason why it may not be picking up the environment? Thanks in advance.

-Greg

推荐答案

应该正常运行.我唯一知道IsInDesignMode返回错误值的地方是使用它来构建在Visual Studio中运行的代码(例如VS插件)时.这是一个很难解决的问题.听起来好像不是你在做什么,但是...

It should work properly. The only place where I know that IsInDesignMode returns a wrong value is when using it to build code that runs within Visual Studio, such as VS plug-ins. This is an issue that is very difficult to solve. It doesn't sound like it is what you are doing, though...

您有我可以测试的复制品吗?或者,您可以下载MVVM Light代码并对其进行调试吗?

Do you have a repro that I can test? Alternatively, could you download the MVVM Light code and debug this?

谢谢, 洛朗(Laurent)

Thanks, Laurent

这篇关于MVVM Light IsInDesignMode属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆