public bool?ShowModal(params object[] parameters) { var vm = new GenerateConfigDialogViewModel((string)parameters?.FirstOrDefault()); var dialog = new GenerateConfigDialog(); dialog.Owner = App.Current.MainWindow; dialog.DataContext = vm; var result = dialog.ShowDialog(); if (result == true) { Result = vm.Settings; } return(result); }
public bool?ShowModal() { var vm = new GenerateConfigDialogViewModel(); var dialog = new GenerateConfigDialog(); dialog.Owner = App.Current.MainWindow; dialog.DataContext = vm; var result = dialog.ShowDialog(); if (result == true) { Result = vm.Settings; } return(result); }