9

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 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!

2 Answers 2

20

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

DesignerProperties.IsInDesignTool
0
6

You mean something like DesignerProperties.IsInDesignTool?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.