public void LoadDirectors() { var listCast = PersonsList.Where(x => x.RoleId == 2).ToList(); DirectorsList.Clear(); foreach (var person in listCast) { DirectorsList.Add(person); } }
private void ExpandOrCollapseSelectedItem() { if (PreviousSelectedPerson != null) { PersonsList.Where(t => t.Id == PreviousSelectedPerson.Id).FirstOrDefault().IsVisible = false; } PersonsList.Where(t => t.Id == SelectedPerson.Id).FirstOrDefault().IsVisible = true; PreviousSelectedPerson = SelectedPerson; }
private void ViewPersonDetails(int Id) { CurrentPerson = PersonsList.Where(person => person.Id == Id).FirstOrDefault(); ((MasterDetailPage)App.Current.MainPage).Detail.Navigation.PushAsync(new PersonDetailView()); }