/// <summary> /// Performs the DeleteContact command. /// </summary> /// <param name="parameter">The DeleteContact command parameter.</param> private void DoDeleteContactCommand(object parameter) { Contacts.Remove(SelectedContact); SelectedContact = null; }
/// <summary> /// Performs the AddContact command. /// </summary> /// <param name="parameter">The AddContact command parameter.</param> private void DoAddContactCommand(object parameter) { ContactViewModel newContact = new ContactViewModel() { Name = "New Contact" }; Contacts.Add(newContact); SelectedContact = newContact; }