private void ContentFrame_Navigated(object sender, NavigationEventArgs e) { HighlightCurrentPage(e.Uri); // update the current database here so that back button navigation works correctly with database changes ApplicationModel.Current.Server.Value.SetCurrentDatabase(new UrlParser(e.Uri.OriginalString)); GC.Collect(); }