private void addToNewlyCreatedList(Person person) { UserInterface.NewList newList = new UserInterface.NewList(); newList.person = person; newList.textBlockUserWillBeAdded.Visibility = System.Windows.Visibility.Visible; newList.textBlockUserWillBeAdded.Text = "@" + person.Username + " will be added"; newList.Show(); }
private void buttonAddToNewList_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; if (button != null) { Person person = button.CommandParameter as Person; if (person != null) { UserInterface.NewList newList = new UserInterface.NewList(); newList.person = person; newList.textBlockUserWillBeAdded.Visibility = System.Windows.Visibility.Visible; newList.textBlockUserWillBeAdded.Text = "@" + person.Username + " will be added"; newList.Show(); } } }