Question

I am using Blend 2012 to design an HTML5 Windows 8 metro app, but I am running into problems because Blend runs all JavaScript in the webpage in the background, live updating my app while it is running. This slows down blend horribly, as I am still prototyping and haven't finished the functionality of the app yet, so it is doing a lot of debug printing, etc.

Is there a way to either disable JavaScript or simply pause execution so I can edit the HTML in Blend without it running my code? I would prefer a solution that is toggled in Blend, rather than adding code in my project to disable functionality if it detects Blend as its host, however I will gladly accept that if it is the sanest method.

Thank you!

Was it helpful?

Solution

I don't think it is possible to disable the execution of JavaScript in Blend.

Just like in the XAML world you can detect if your code is running in a designer, like Blend. Here's an example of how you might use that:

var isInDesigner = Windows.ApplicationModel.DesignMode.designModeEnabled;

if(!isInDesigner){
    // code not running in Expression Blend
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top