private void DisplayAddDialog() { var dialog = new RepairAddView { Owner = Window.GetWindow(this) }; dialog.Closed += (s, e) => dialog.Owner.Focus(); dialog.Show(); }
private void DisplayEditDialog() { var item = ViewModel.SelectedItem as Repair; if (item != null) { var dialog = new RepairAddView(item) { Owner = Window.GetWindow(this) }; dialog.Closed += (s, e) => dialog.Owner.Focus(); dialog.Show(); } }