Пример #1
0
        private void DisplayAddDialog()
        {
            var dialog = new RepairAddView {
                Owner = Window.GetWindow(this)
            };

            dialog.Closed += (s, e) => dialog.Owner.Focus();
            dialog.Show();
        }
Пример #2
0
        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();
            }
        }