public ProgressDialog(string title) InitializeComponent(); Title = title; Owner = Application.Current.MainWindow; public void UpdateProgress(int current, int total, string message)

// Save to saveFileDialog.FileName

string fileContent = File.ReadAllText(openFileDialog.FileName);

public string UserName get; private set; public MyDialog()

// Usage with async operation async Task ProcessDataAsync()

private void OkButton_Click(object sender, RoutedEventArgs e)

// Save logic

public T ShowDialog<T>(object viewModel) where T : class