locked
Close/Reset a page

    Question

  • Hi,

    I have two pages, A and B.

    A has a button which leads to B and B has a button which leads to A.

    So i make some changes,enter some text in a textbox in A,then press the button. It goes to B. Now when i press the button in B, i want it to go to page A but with the page as if it was opened the first time.

    Instead,when i press button in B it goes to page A but with the text i entered.

    So is there any way to kill page A when i got to page B so that when i go back to page A,it is a fresh new Page?

    Or is there any way to reset Page A to its initial position?


    Ashish Shah

    Thursday, July 31, 2014 4:47 PM

Answers

  • Try this: NavigationCacheMode property

    Set the Mode as Disabled per documention: NavigationCacheMode enumeration.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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.

    Tuesday, August 05, 2014 8:26 AM
    Moderator

All replies

  • How are you navigating between the two pages?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, July 31, 2014 6:02 PM
    Moderator
  • this.Frame.Navigate(typeof(B));

    I found the above way on some forum. i am pretty new to  C#.

    Is this way of navigating to new pages wrong?


    Ashish Shah

    Thursday, July 31, 2014 6:27 PM
  • Try this: NavigationCacheMode property

    Set the Mode as Disabled per documention: NavigationCacheMode enumeration.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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.

    Tuesday, August 05, 2014 8:26 AM
    Moderator