InitializeComponent(); Owner = Application.Current.MainWindow;
private Type GetWindowTypeForViewModel(Type viewModelType)
Progress Dialog public partial class ProgressDialog : Window
// Convention: MainViewModel -> MainWindow string viewName = viewModelType.Name.Replace("ViewModel", "Window"); return Type.GetType($"MyApp.Views.viewName");
if (_dialogService.ShowConfirmation("Save changes?", "Confirm")) // Save logic
// Generic dialog window public partial class GenericDialog<T> : Window
// Save logic
Wpf Dialogs -
InitializeComponent(); Owner = Application.Current.MainWindow;
private Type GetWindowTypeForViewModel(Type viewModelType) WPF Dialogs
Progress Dialog public partial class ProgressDialog : Window InitializeComponent(); Owner = Application
// Convention: MainViewModel -> MainWindow string viewName = viewModelType.Name.Replace("ViewModel", "Window"); return Type.GetType($"MyApp.Views.viewName"); Owner = Application.Current.MainWindow
if (_dialogService.ShowConfirmation("Save changes?", "Confirm")) // Save logic
// Generic dialog window public partial class GenericDialog<T> : Window
// Save logic