Search code examples
expression-blendwinjs

How do I detect design mode with WinJS?


I have bits of javascript that causes problems when viewed in Blend for Visual Studion 2012. I want to have a simple check for design mode so that I can skip the code when viewed in the Blend Design Surface.


Solution

  • I tweeted this question and got an answer from my peers really quick.

    var isInDesignMode = Windows.ApplicationModel.DesignMode.designModeEnabled;