public void miEditWord_Click(object sender, RoutedEventArgs e) { // https://stackoverflow.com/questions/16236905/access-parent-window-from-user-control var dlg = new WordsLangDetailDlg(Window.GetWindow(this), vmWordsLang, SelectedWordItem); dlg.ShowDialog(); }
void btnAdd_Click(object sender, RoutedEventArgs e) { var dlg = new WordsLangDetailDlg(Window.GetWindow(this), vm, vm.NewLangWord()); dlg.ShowDialog(); }