开发者

Detecting if the application is in design mode in Windows Phone 7 ViewModel

Is there any way I can detect the designer mode or runtime mode of an WP7 project? Currently I reference Application.Current... in a ViewModel and apparently the View does not like it in designer. The开发者_如何学Python XAML designer throws exception. It works fine in runtime. So I am thinking I can do some if/else in ViewModel to workaround this if I know it's in designer mode.

Thanks!


Simple. This is the same as it is in Silverlight:

DesignerProperties.IsInDesignTool


You mean something like DesignerProperties.IsInDesignTool?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜