public override async void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary<string, object> viewModelState) { var favourites = await _sql.GetFavourites(); Favourites = new ObservableCollection<Directory>(favourites.OrderBy(x => x.Name)); if (!(Favourites.Any())) return; await Task.Delay(50); if (Favourites.Count() == 1) { SelectedSchool1 = Favourites.First(); SelectedSchool2 = Favourites.First(); } else { SelectedSchool1 = Favourites.First(); SelectedSchool2 = Favourites[1]; } }
public void ExecuteTapSchoolCommand(Directory directory) { NavigationParameters.Instance.SetParameters(directory); _nav.Navigate(Experiences.School); }