diff --git a/src/Cimbalino.Toolkit (WPA81)/Services/NavigationService.cs b/src/Cimbalino.Toolkit (WPA81)/Services/NavigationService.cs index de76665..072e246 100644 --- a/src/Cimbalino.Toolkit (WPA81)/Services/NavigationService.cs +++ b/src/Cimbalino.Toolkit (WPA81)/Services/NavigationService.cs @@ -276,6 +276,24 @@ public virtual bool RemoveBackEntry() return false; } + /// + /// Removes an entry from the RootFrame's BackStack. + /// + /// the the last entry of the BackStack must be to be able to remove the BackEntry. + public void RemoveBackEntry(Type type) + { + if (_frame.BackStack == null || _frame.BackStack.Count < 1) + { + return; + } + + while (_frame.BackStack.Any(e => e.SourcePageType == type)) + { + var entry = _frame.BackStack.First(e => e.SourcePageType == type); + _frame.BackStack.Remove(entry); + } + } + /// /// Clears the backstack for the frame in its entirety. ///