Alexandria.Common.SuspensionManager.UnregisterFrame C# (CSharp) Method

UnregisterFrame() public static method

Disassociates a Frame previously registered by RegisterFrame from SessionState. Any navigation state previously captured will be removed.
public static UnregisterFrame ( Frame frame ) : void
frame Windows.UI.Xaml.Controls.Frame An instance whose navigation history should no longer be /// managed.
return void
        public static void UnregisterFrame(Frame frame)
        {
            // Remove session state and remove the frame from the list of frames whose navigation
            // state will be saved (along with any weak references that are no longer reachable)
            SessionState.Remove((String)frame.GetValue(FrameSessionStateKeyProperty));
            _registeredFrames.RemoveAll((weakFrameReference) =>
            {
                Frame testFrame;
                return !weakFrameReference.TryGetTarget(out testFrame) || testFrame == frame;
            });
        }