Wpf — Dialogs

public GenericDialog(string title, T initialData)

// Basic alert MessageBox.Show("File saved successfully!"); // With title and buttons MessageBoxResult result = MessageBox.Show( "Do you want to save changes?", "Unsaved Changes", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning); WPF Dialogs

await Task.Delay(50); progressDialog.UpdateProgress(i, 100, $"Step i+1 of 100"); public GenericDialog(string title

public class MainViewModel : INotifyPropertyChanged $"Step i+1 of 100")

var progressDialog = new ProgressDialog("Processing..."); progressDialog.Show();

// Convention: MainViewModel -> MainWindow string viewName = viewModelType.Name.Replace("ViewModel", "Window"); return Type.GetType($"MyApp.Views.viewName");

public partial class MyDialog : Window