locked
Problem identifying closing app by user RRS feed

  • Question

  • Not sure it's a relevant detail, but I use Prism for store apps, so my App class is deriving from MvvmAppBase.

    In my App class I override OnLaunched and in the first line of this override I write arg.PreviousExecutionState.ToString() to a text file. I run the app from VS2013 with Ctrl+F5.

    After I close manually (click on the top of the view and drag to the bottom of the screen) and run again, I expect to see "ClosedByUser" in the text file, but I always see "Terminated". Why is that, and how can I detect if the app was closed by the user or terminated by the OS?

    Monday, November 4, 2013 9:15 PM

Answers