protected OnNavigated ( |
||
e | The data associated with the event. | |
return | void |
private void OnNavigationCompleted(NavigationState navigationState, Page page) { Page currentPage = Page; if ((currentPage != null) && !(currentPage is ErrorPage)) { _cache.AddPage(currentPage, currentPage.OriginalUri); } page.Uri = navigationState.uri.GetUri(); page.OriginalUri = navigationState.uri.OriginalUri; if (navigationState.cachedPage == false) { IsNavigating = false; } NavigateInternal(page); if (navigationState.journalNavigation) { _journal.AddEntry(navigationState.uri.OriginalUri); } _backCommand.UpdateStatus(_journal.CanGoBack); _forwardCommand.UpdateStatus(_journal.CanGoForward); page.OnNavigated(new PageNavigatedEventArgs(!navigationState.cachedPage)); if (String.IsNullOrEmpty(navigationState.fragment) == false) { page.OnStateChanged(new PageStateEventArgs(navigationState.fragment)); } OnNavigated(new NavigatedEventArgs(navigationState.uri.OriginalUri, page is ErrorPage)); }
private void OnNavigationCompleted(NavigationState navigationState, Page page) { Page currentPage = Page; if (currentPage != null) { _cache.RemovePageReference(currentPage); } page.Uri = navigationState.uri; if (navigationState.cachedPage == false) { if (!(page is ErrorPage)) { _cache.AddPageReference(page); } VisualStateManager.GoToState(this, "Navigated", /* useTransitions */ true); } NavigateInternal(page); if (navigationState.journalNavigation) { _journal.AddEntry(navigationState.uri); } _backCommand.UpdateStatus(_journal.CanGoBack); _forwardCommand.UpdateStatus(_journal.CanGoForward); page.OnNavigated(new PageNavigatedEventArgs(!navigationState.cachedPage)); OnNavigated(new NavigatedEventArgs(navigationState.uri, page is ErrorPage)); }