/// The methods provided in this section are simply used to allow /// NavigationHelper to respond to the page's navigation methods. /// /// Page specific logic should be placed in event handlers for the /// <see cref="GridCS.Common.NavigationHelper.LoadState"/> /// and <see cref="GridCS.Common.NavigationHelper.SaveState"/>. /// The navigation parameter is available in the LoadState method /// in addition to page state preserved during an earlier session. protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter is ReviewViewModel) { bookViewModel = (e.Parameter as ReviewViewModel).Book; bookViewModel.LoadFullData(); } else if (e.Parameter is BookViewModel) { bookViewModel = e.Parameter as BookViewModel; bookViewModel.LoadFullData(); } else if (e.Parameter is String) { bookViewModel = new BookViewModel(e.Parameter as string); //bookViewModel.LoadFullData(e.Parameter as string); } pageTitle.DataContext = bookViewModel; BookPanel.DataContext = bookViewModel; DescriptionPanel.DataContext = bookViewModel; ReviewPanel.DataContext = bookViewModel; navigationHelper.OnNavigatedTo(e); }