public ProgressDialog() { this.CancelVisibility = Visibility.Collapsed; this.IsIndeterministic = true; this.dialog = new ProgressContentDialog { DataContext = this }; this.Cancel = new Command(() => this.cancelAction?.Invoke()); }
public ProgressDialog(ProgressDialogConfig config) { this.config = config; this.dialog = new ProgressContentDialog { DataContext = this }; this.Cancel = new Command(() => config.OnCancel?.Invoke()); }
public void Show() { if (this.IsShowing) { return; } this.IsShowing = true; this.Dispatch(() => { if (this.dialog == null) { this.dialog = new ProgressContentDialog { DataContext = this } } ; this.dialog.ShowAsync(); }); }