private void Button_Edit_Click(object sender, RoutedEventArgs e) { if (personListBox.SelectedItems.Count == 1) { EditPerson editPerson = new EditPerson(); editPerson.Owner = this; dynamic person = personListBox.SelectedItem; editPerson.person = person; editPerson.Show(); } }
private void LeftClickExecute(object sender, ExecutedRoutedEventArgs e) { EditPerson editPerson = new EditPerson(); editPerson.Owner = this; dynamic person = personListBox.SelectedItem; editPerson.person = person; editPerson.Show(); e.Handled = true; }