Expression Blend, Windows 8, WinJs

WinJs DesignTime Mode

While working on the port of my game Orbizoid to Windows 8 I ran into an issue with the starfield in de background of the game. The starfield was running in Expression Blend too. At first this was kinda funny, but soon the performance dropped and it became unworkable. There used to be a property to detect if you are running inside Expression Blend before, I hoped this was still available when working on Windows 8 applications in javascript. I had to search for a moment, but it is possible.

var isInDesigner = Windows.ApplicationModel.DesignMode.designModeEnabled;

// code not running in Expression Blend

now you can safely use the isInDesigner variable throughout your code to enable/disable specific code running in Blend.

Leave a Reply

Seo wordpress plugin by
%d bloggers like this: