locked
What happen if I close primary(Main?) View?

    Question

  • In the "Multiple Views Sample" of 8.1 app samples,the comment claims that "You should never try to close the primary view",but what happens if I close "primary" view?

    I think "primary" view means that the CoreApplicationView which's IsMain Property is true,that is to say,the first CoreApplicationView which is created on normal application launch.

    That sample claims also one good model is primary view to contain most of functionality and secondary views to contain a single document or some,but this isn't fit for some kind of app like modern version of Internet Explorer.

    I wanna know closing primary view and continuing app causes some problem or not.

    As far as my app,app works fine after closing primary view.



    cyclops

    Sunday, May 4, 2014 5:35 AM

Answers

  • Hi,

    You can refer to the link below to get some information about close app:

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/516e3443-ce5b-4e7d-8198-064655e4608e/how-to-close-application?forum=winappswithcsharp

    And windows store apps  must never close themselves or present app UI to allow a user to close your app. Suspending and terminating apps is handled by Windows on the user’s behalf to maintain system performance and battery life. If users want to close your app, they can do so by swiping from the top to the bottom of the screen or by pressing ALT+F4. See Managing app lifecycle so your apps feel "always alive".

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 5, 2014 9:22 AM

All replies

  • Hi,

    You can refer to the link below:

    http://msdn.microsoft.com/en-us/library/windows/apps/dn582023.aspx

    There explain why you cannot close the main View in app:

    Important  Don't close the main view's window because this terminates the app. Windows Store appcertification requires that you don't programmatically close an app. Only close a window that is not the main window, as in this example.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 5, 2014 3:50 AM
  • I did misunderstand that Consolidated means Closed.

    So that means,suppose modern IE,doing closing gesture for main window just consolidated ApplicationView but Window isn't closed.right?

    Still I have some questions about relationship between shutting down and closing window,but I'll try to investigate.


    cyclops

    Monday, May 5, 2014 5:32 AM
  • Hi,

    You can refer to the link below to get some information about close app:

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/516e3443-ce5b-4e7d-8198-064655e4608e/how-to-close-application?forum=winappswithcsharp

    And windows store apps  must never close themselves or present app UI to allow a user to close your app. Suspending and terminating apps is handled by Windows on the user’s behalf to maintain system performance and battery life. If users want to close your app, they can do so by swiping from the top to the bottom of the screen or by pressing ALT+F4. See Managing app lifecycle so your apps feel "always alive".

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 5, 2014 9:22 AM