// Rechtsklick Film Bearbeiten private void ContextMenuListViewFilmeEdit_OnClick(object sender, RoutedEventArgs e) { if (listViewFilme.SelectedIndex > -1) { Film selectedFilm = (Film)listViewFilme.SelectedItem; // casting the list view FilmHinzufuegenNeu filmHinzufuegenNeu = new FilmHinzufuegenNeu(selectedFilm, this); filmHinzufuegenNeu.ShowDialog(); } }
// Menu Items private void MenuItemFilmHinzufuegen_Click(object sender, RoutedEventArgs e) { FilmHinzufuegenNeu filmHinzufuegenNeu = new FilmHinzufuegenNeu(null, this); filmHinzufuegenNeu.ShowDialog(); }