Frame.SetNavigationState method

Applies to Windows and Windows Phone

Reads and restores the navigation history of a Frame from a provided serialization string.

Syntax


public void SetNavigationState(
  string navigationState
)

Parameters

navigationState

Type: System.String [.NET] | Platform::String [C++]

The serialization string that supplies the restore point for navigation history.

Remarks

This method is useful to restore the navigation state of your app after it has been suspended and resumed. When your app is suspended, call GetNavigationState and save the return value. When your app is resumed, call SetNavigationState and pass it the saved value.

Calling SetNavigationState will call Page.OnNavigatedTo for the current page, with NavigationMode.Back. SetNavigationState is usually called when the application is being resumed, so the current page is navigated to.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Frame

 

 

Show:
© 2014 Microsoft