Note that there are some explanatory texts on larger screens.

plurals
  1. USYasharBahman
    primarykey
    data
    text
    plurals
    1. COSo apparently I can't use DisplayInformation.CurrentOrientation because the DisplayInformation class is a Windows Store app-only class. Anyone have any ideas?
      singulars
    2. COIt fixes the problem because the CreateFileAsync() function is asynchronous. In the Windows Store C# API (I dunno about WinJS) any asynchronous function will have the "Async" postfix. This means you have the ability to 'kick off' the file creation, do other stuff, then retrieve the StorageFile later when it's created. By adding the "await" keyword, you make the function synchronous; it's like saying "kick off file creation and don't come back till it's done". I know it's long but checkout http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
      singulars
    3. COHey Tim! Sorry, maybe I was unclear. I'm not double-clicking a Metro app exe. Here're the repro steps I'm talking about: 1. Compile the code listed above into a classic desktop .exe 2. Double click the .exe 3. As soon as the app opens, it will sleep for 5 seconds. During that time launch any Metro app (let's say the mail app). 4. After the 5 seconds expires, the task bar will be set as the foreground window and the user should be taken to the classic desktop. The actual result though is that SetForegroundWindow() call fails. What's funny though is if it's launched via VS2013, it succeeds.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload