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