public MainWindow() { InitializeComponent(); contacts = Contact.GetContactByTelOrName(); ListContacts.ItemsSource = contacts; if (newContact == null) { newContact = new Contact(); } }
private void Click_Search(object sender, RoutedEventArgs e) { List <Contact> listSearch = Contact.GetContactByTelOrName(SearchTel.Text); ListContacts.ItemsSource = listSearch; }