locked
Showing a screen as a pop up in windows store apps RRS feed

  • Question

  • Hi,

    I want to show a screen as a pop on my current screen on click of a button from my current screen.

    Currently I am navigating to a new page and showing the content and just because of this I need to save the context of my previous screen and this has some data which I need to save.

    So, wanted to know in windows store app can we show one screen on the top of another similar to form applications and by closing the form I see my previous form?

    Monday, September 30, 2013 10:34 AM

Answers

  • Hi Naveen,

    you can do such things with the Popup-class. With it you can define arbitrary content to be displayed in a Popup. But in my opinion you shouldn't do this with a whole page. There are other possibilities, but hey, you have a page, so just navigate to it. If you don't use the "Blank Page"-Template, but the "Basic Page"-Template to add pages to your project, the page will contain Methods to Load and Save its state. You can even delete the MainPage in your Blank App and replace it by a MainPage created with the "Basic Page"-Template. Then you've everything you need to easily save the state of pages.

    edit: In addition, take a look at the NavigationCacheMode-Property of your page. Set this to required, and there'll only be one instance of your page.


    Thomas Claudius Huber

    "If you can´t make your app run faster, make it at least look & feel extremly fast"

    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook


    Monday, September 30, 2013 10:44 AM