Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
 private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
 {
     FilmListBox.ItemsSource = AllFilms.Where(f => f.Titel.ToLower().Contains(SearchTextBox.Text.ToLower())).ToList();
 }