Skip to content

Commit

Permalink
Corrected WP NavigationController to avoid view model stack desync
Browse files Browse the repository at this point in the history
  • Loading branch information
madd0 committed Dec 13, 2013
1 parent 885c7d3 commit 9624600
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WygwamToolkit.Phone/NavigationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ protected override bool IsViewModelRegistered(Type viewModelType)

private void OnFrameNavigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
// navigating to null means that we've navigated outside the app, no need to touch our internal stack
if (e.Content == null)
{
return;
}

var navigationTarget = e.Content as FrameworkElement;

if (e.NavigationMode == NavigationMode.Back)
Expand Down

0 comments on commit 9624600

Please sign in to comment.