private void RestorePageState(object obj) { this.ViewModel = (StopViewModel)obj; var viewSource = (CollectionViewSource)Resources["src"]; viewSource.Source = ViewModel.ItemsSource; if (ViewModel.ScrollPosition != null) { ContentListView.ScrollToGroupedPosition((ListViewPositionResult)ViewModel.ScrollPosition); } registerBottomObserver(); }
private void RestorePageState() { ViewModel.ScrollIntoViewRequired += ViewModel_ScrollIntoViewRequired; if (ViewModel.usePivotPageing) { addContentToPivot(); } setFavoriteIcon(); if (ViewModel.ScrollPosition != null) { ContentListView.ScrollToGroupedPosition((ListViewPositionResult)ViewModel.ScrollPosition); } }