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