SessionStateForFrame() public static method

Provides storage for session state associated with the specified Frame. Frames that have been previously registered with RegisterFrame have their session state saved and restored automatically as a part of the global SessionState. Frames that are not registered have transient state that can still be useful when restoring pages that have been discarded from the navigation cache.
Apps may choose to rely on NavigationHelper to manage page-specific state instead of working with frame session state directly.
public static SessionStateForFrame ( Frame frame ) : Object>.Dictionary
frame Windows.UI.Xaml.Controls.Frame The instance for which session state is desired.
return Object>.Dictionary
        /// <summary>
        /// Invoked when this page will no longer be displayed in a Frame.
        /// This method calls <see cref="SaveState"/>, where all page specific
        /// navigation and process lifetime management logic should be placed.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property provides the group to be displayed.</param>
        public void OnNavigatedFrom(NavigationEventArgs e)
        {
            var frameState = SuspensionManager.SessionStateForFrame(this.Frame);
            var pageState  = new Dictionary <String, Object>();

            if (this.SaveState != null)
            {
                this.SaveState(this, new SaveStateEventArgs(pageState));
            }
            frameState[_pageKey] = pageState;
        }