public void Show(object dataContext) { IDialogViewModel viewModel = (IDialogViewModel)dataContext; var win = new WindowDialogView(); win.Title = viewModel.Title; win.Content = viewModel; win.Show(); }
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()); }