/// <summary> /// Remove the first page of the backstack with optional pageToken and parameter /// </summary> /// <param name="pageToken"></param> /// <param name="parameter"></param> public void RemoveFirstPage(string pageToken = null, object parameter = null) { PageStackEntry page; if (pageToken != null) { var pageType = _navigationResolver(pageToken); if (parameter != null) { page = _frame.BackStack.FirstOrDefault(x => x.SourcePageType == pageType && x.Parameter.Equals(parameter)); } else { page = _frame.BackStack.FirstOrDefault(x => x.SourcePageType == pageType); } } else { page = _frame.BackStack.FirstOrDefault(); } if (page != null) { _frame.RemoveBackStackEntry(page); } }