locked
Navigation problem RRS feed

  • Question

  • I am trying to develop  a small app for win 8.  i have many pages , if i navigate from one page to other  

    lets say 1 to 2 wene i navigate back from 2 to 1

     I am loosing the data that i entered  before navigating.

    please  help me how to get the data back on navigation. please

    Tuesday, October 2, 2012 12:38 PM

Answers

  • IN the page tag in the xaml add:

    NavigationCacheMode="Required"

    • Proposed as answer by Jesse Jiang Thursday, October 4, 2012 6:35 AM
    • Marked as answer by Jesse Jiang Tuesday, October 16, 2012 7:29 AM
    Tuesday, October 2, 2012 12:43 PM
  • The anwser from Dave is good, but I prefere use MVVM ( using MVVM Light) and send data between pages. When i see about this i did test about NavigationCacheMode="Required" and didn´t like (tried to find an article about it, but didn´t find).


    Sara Silva

    • Marked as answer by Jesse Jiang Tuesday, October 16, 2012 7:29 AM
    Tuesday, October 2, 2012 2:26 PM

All replies

  • IN the page tag in the xaml add:

    NavigationCacheMode="Required"

    • Proposed as answer by Jesse Jiang Thursday, October 4, 2012 6:35 AM
    • Marked as answer by Jesse Jiang Tuesday, October 16, 2012 7:29 AM
    Tuesday, October 2, 2012 12:43 PM
  • The anwser from Dave is good, but I prefere use MVVM ( using MVVM Light) and send data between pages. When i see about this i did test about NavigationCacheMode="Required" and didn´t like (tried to find an article about it, but didn´t find).


    Sara Silva

    • Marked as answer by Jesse Jiang Tuesday, October 16, 2012 7:29 AM
    Tuesday, October 2, 2012 2:26 PM
  • sir,

                     I am just now  started and trying  to build small app. where to place code given by you i..e  '  NavigationCacheMode="Required"  '

    please sir can you make it more clear. in the first page or where ? i tried but iam getting error

    Tuesday, October 9, 2012 3:12 PM
  • I think can be in all page in the constructor.

    Sara Silva

    Tuesday, October 9, 2012 3:15 PM