Using jQuery with Windows 8 Metro JavaScript App causes security error

You need to edit the jQuery source so that you pass the jQuery.support function to MSApp.execUnsafeLocalFunction, which disables the unsafe content checking, like this: jQuery.support = MSApp.execUnsafeLocalFunction(function() { var support, all, a, select, opt, input, fragment, tds, events, eventName, i, isSupported, div = document.createElement( “div” ), documentElement = document.documentElement; // lots of statements removed for … Read more

Is there a list of “standard” Tile colors for Metro style Windows 8 apps?

Check my Metro Design Guideline presentation at https://skydrive.live.com/view.aspx?resid=40CFFDE85F1AB56A!1284 slide 55 The colors are: PURPLE RGB 162 0 255 A200FF MAGENTA RGB 255 0 151 FF0097 TEAL RGB 0 171 169 00ABA9 LIME RGB 140 191 38 8CBF26 BROWN RGB 160 80 0 A05000 PINK RGB 230 113 184 E671B8 ORANGE RGB 240 150 9 F09609 … Read more

Making WPF applications look Metro-styled, even in Windows 7? (Window Chrome / Theming / Theme)

What I did was creating my own Window and Style. Because I like to have control over everything and I didn’t want some external libraries just to use a Window from it. I looked at already mentioned MahApps.Metro on GitHub and also very nice Modern UI on GitHub. (.NET4.5 only) There is one more it’s … Read more

Is it possible to await an event instead of another async method?

You can use an instance of the SemaphoreSlim Class as a signal: private SemaphoreSlim signal = new SemaphoreSlim(0, 1); // set signal in event signal.Release(); // wait for signal somewhere else await signal.WaitAsync(); Alternatively, you can use an instance of the TaskCompletionSource<T> Class to create a Task<T> that represents the result of the button click: … Read more