Пример #1
0
        public void Show(object dataContext)
        {
            IDialogViewModel viewModel = (IDialogViewModel)dataContext;
            var win = new WindowDialogView();

            win.Title   = viewModel.Title;
            win.Content = viewModel;
            win.Show();
        }
Пример #2
0
        public bool?ShowDialog(object dataContext)
        {
            IDialogViewModel viewModel = (IDialogViewModel)dataContext;
            var win = new WindowDialogView();

            win.Title       = viewModel.Title;
            win.DataContext = viewModel;
            win.Owner       = Application.Current.MainWindow;
            return(win.ShowDialog());
        }