void DoSearchCommand(string searchText) { if (string.IsNullOrEmpty(searchText)) { SearchMembreList.Clear(); SearchMembreList.AddRange(MembreList); } else { SearchMembreList.Clear(); SearchMembreList.AddRange(MembreList.Where(x => x.Nom.Contains(searchText))); } }
private void MembreList_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { SearchMembreList.Clear(); SearchMembreList.AddRange(MembreList); }