locked
Empty Page and frame cache WinRT Windows 8

    Question

  • How can i dismiss current page (or navigate frame to null page) and clear frame cache from last pages?
    Tuesday, April 01, 2014 2:08 PM

Answers

  • You can go back by calling Frame.GoBack(). There isn't a direct way to navigate back more than a single step at a time, but you can cache the navigation state from a given point (such as the beginning) with the GetNavigationState method and then restore that cached state with the SetNavigationState method. The actual contents of the state are an implementation detail and not something the app should depend on or modify directly.

    Typically you would call GetNavigationState when suspending and SetNavigationState when restarting, but you can cache and call these at other points as well.

    --Rob

    • Marked as answer by Rafal.Mazurek Monday, April 07, 2014 3:17 PM
    Tuesday, April 01, 2014 9:58 PM
    Owner

All replies

  • You can go back by calling Frame.GoBack(). There isn't a direct way to navigate back more than a single step at a time, but you can cache the navigation state from a given point (such as the beginning) with the GetNavigationState method and then restore that cached state with the SetNavigationState method. The actual contents of the state are an implementation detail and not something the app should depend on or modify directly.

    Typically you would call GetNavigationState when suspending and SetNavigationState when restarting, but you can cache and call these at other points as well.

    --Rob

    • Marked as answer by Rafal.Mazurek Monday, April 07, 2014 3:17 PM
    Tuesday, April 01, 2014 9:58 PM
    Owner
  • I just use

    Frame.Navigate(typeof(Page));

    and then it's empty.

    Saturday, May 24, 2014 6:38 PM