private void ButtonOK_OnClick(object sender, RoutedEventArgs e) { if (this.ListBox.SelectedItem == null) { return; } ActorSelectData actor = ListBox.SelectedItem as ActorSelectData; if (actor == null) { return; } this.DialogResult = true; }
public ActorSelectData GetActorSelectData() { ActorSelectData actor = ListBox.SelectedItem as ActorSelectData; return(actor); }