void DoSearchCommand(string searchText) { if (string.IsNullOrEmpty(searchText)) { SearchDocumentList.Clear(); SearchDocumentList.AddRange(DocumentList); } else { SearchDocumentList.Clear(); SearchDocumentList.AddRange(DocumentList.Where(x => x.nomDocument.Contains(searchText))); } }
private void DocumentList_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { SearchDocumentList.Clear(); SearchDocumentList.AddRange(DocumentList); }