void Host_NavigationStateChanged(object sender, NavigationStateChangedEventArgs e) { string newViewerState, newItemId; if (e.NewNavigationState.Contains('/')) { var split = e.NewNavigationState.Split('/'); newViewerState = split[0]; newItemId = split[1]; if (string.IsNullOrEmpty(newItemId)) { newItemId = null; } } else { newViewerState = e.NewNavigationState; newItemId = null; } if (newViewerState != Viewer.ViewerState) { viewerStateNavigating = true; Viewer.LoadCollection(collectionUrl, newViewerState); } if (newItemId != Viewer.CurrentItemId) { itemNavigating = true; Viewer.CurrentItemId = newItemId; } }
/// <summary> /// Handle a change to the navigation state string /// </summary> private void OnHostNavigationStateChanged(object sender, NavigationStateChangedEventArgs args) { // Update the travel log using the new and old states TravelLogNavigation(args.PreviousNavigationState, args.NewNavigationState); }
void host_NavigationStateChanged (object sender, NavigationStateChangedEventArgs e) { }
private void OnHostNavigationStateChanged(object sender, NavigationStateChangedEventArgs e) { if (_addingJournalEntry) { return; } _navigateAction(new Uri(e.NewNavigationState, UriKind.Relative)); }