locked
Swipe to terminate app and print at the same time?

    Question

  • Would it be possible maybe through a javascript function to swipe and terminate the app + print something?
    Wednesday, March 20, 2013 5:12 PM

Answers

  • If you are programmatically closing the app using window.close, then it is against the Windows Store policy, you should not do that.

    If the user action to terminate the app by 'swiping' means using the close gesture or ALT+F4, then your app can subscribe for the oncheckpoint function which will be called roughly around 10 seconds from when the app was being closed. See this link for more info: http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx and the "App close" section. However, you cannot call window.print from the suspending event since it will return you an error (which is expected).

    Wednesday, March 20, 2013 10:22 PM
    Moderator

All replies

  • What is the scenario you are trying to accomplish by doing this?
    Wednesday, March 20, 2013 8:17 PM
    Moderator
  • When the user gets on the last page we want them to be able to close the application and print it by swiping.
    Wednesday, March 20, 2013 9:46 PM
  • If you are programmatically closing the app using window.close, then it is against the Windows Store policy, you should not do that.

    If the user action to terminate the app by 'swiping' means using the close gesture or ALT+F4, then your app can subscribe for the oncheckpoint function which will be called roughly around 10 seconds from when the app was being closed. See this link for more info: http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx and the "App close" section. However, you cannot call window.print from the suspending event since it will return you an error (which is expected).

    Wednesday, March 20, 2013 10:22 PM
    Moderator