private async Task SearchFilms() { if (AllFilms == null) { await LoadFilms(); } if (string.IsNullOrWhiteSpace(SearchedPhrase)) { FilmsToDisplay = new List <FilmModel>(AllFilms); } else { FilmsToDisplay = AllFilms.Where(x => x.Title.ToLower().Contains(SearchedPhrase.ToLower())).ToList(); } }
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e) { FilmListBox.ItemsSource = AllFilms.Where(f => f.Titel.ToLower().Contains(SearchTextBox.Text.ToLower())).ToList(); }