locked
When clicking on the Close Button force the app to NotRunning state?

    Question

  • Hi,

    When clicking on the Close Button force the app to NotRunning state? The problem is the I have multi-view, when click on the close button then the second view is closed but the first view goes to suspending mode/state. That produce un-expect result.

    Thanks and Best Regards,

    Weera

    Thursday, October 30, 2014 12:08 PM

Answers

  • Close should only close the current window. Other Windows will continue to run normally. Apps should not try to programmatically exit, and doing so will be treated as crash. Apps should let the user and OS manage ago lifetime through the standard mechanisms rather than trying to override them.

    That said, in exceptional cases you can call Application.Exit.

    Thursday, October 30, 2014 3:08 PM
    Owner

All replies

  • Close should only close the current window. Other Windows will continue to run normally. Apps should not try to programmatically exit, and doing so will be treated as crash. Apps should let the user and OS manage ago lifetime through the standard mechanisms rather than trying to override them.

    That said, in exceptional cases you can call Application.Exit.

    Thursday, October 30, 2014 3:08 PM
    Owner
  • Hi Rob Caplan [MSFT]

    Thanks, It works because of I did not dispose the instance of object before calling the Application.Exit.

    That was blocking me.

    Thanks and Best Regards,

    Weera

    Thanks
    Thursday, October 30, 2014 9:26 PM