public class MainViewModel : INotifyPropertyChanged
Need me to elaborate on any specific dialog pattern or help with a particular use case?
if (dialog.ShowDialog() == DialogResult.OK)
// Save to saveFileDialog.FileName
InitializeComponent(); Owner = Application.Current.MainWindow;
// Convention: MainViewModel -> MainWindow string viewName = viewModelType.Name.Replace("ViewModel", "Window"); return Type.GetType($"MyApp.Views.viewName");
public ProgressDialog(string title) InitializeComponent(); Title = title; Owner = Application.Current.MainWindow; public void UpdateProgress(int current, int total, string message)
Filter = "Text files (*.txt); if (openFileDialog.ShowDialog() == true)
public GenericDialog(string title, T initialData)
private Type GetWindowTypeForViewModel(Type viewModelType)
