void dgDicts_RowDoubleClick(object sender, MouseButtonEventArgs e) { dgDicts.CancelEdit(); var dlg = new DictsDetailDlg(Window.GetWindow(this), (MDictionary)((DataGridRow)sender).Item, vm); dlg.ShowDialog(); }
void btnAdd_Click(object sender, RoutedEventArgs e) { var dlg = new DictsDetailDlg(Window.GetWindow(this), vm.NewDictionary(), vm); if (dlg.ShowDialog() == true) { vm.Add(dlg.Item); } }