public SavedArticlesView(SavedArticlesViewModel viewModel) { InitializeComponent(); BindingContext = viewModel; ListViewHelper.DisableItemSelectedAction(listView); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode == NavigationMode.Back) { SavedArticlesViewModel savedArticlesViewModel = DataContext as SavedArticlesViewModel; if (savedArticlesViewModel == null || savedArticlesViewModel.Articles == null || savedArticlesViewModel.Articles.Count == 0) { NavigationService.GoBack(); } } }
public void Setup() { _stateController = new StateController(); _vm = new SavedArticlesViewModel(_stateController); }