Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/Cimbalino.Toolkit (WPA81)/Services/NavigationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,24 @@ public virtual bool RemoveBackEntry()
return false;
}

/// <summary>
/// Removes an entry from the RootFrame's BackStack.
/// </summary>
/// <param name="type">the <see cref="System.Type"/> the last entry of the BackStack must be to be able to remove the BackEntry.</param>
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);
}
}

/// <summary>
/// Clears the backstack for the frame in its entirety.
/// </summary>
Expand Down