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?
精彩评论