private void dialog_Click(object sender, RoutedEventArgs e) { FluentDialog.Show("Dialog", "This is a Dialog.", new FluentDialogOptions { CancelButtonVisibility = Visibility.Collapsed, DeleteButtonVisibility = Visibility.Collapsed }); }
private async void progress_Click(object sender, RoutedEventArgs e) { var cancelationToken = new CancellationTokenSource(); await FluentDialog.ShowProgressAsync("Wait...", "Process 1...", () => { Thread.Sleep(4000); FluentDialog.UpdateDialog("Process 2..."); Thread.Sleep(3000); }, cancelationToken); }
private void CancelButton_Click(object sender, RoutedEventArgs e) { FluentDialog.TaskCompletionSource?.TrySetResult(DialogResult.Cancel); FluentDialog.Close(); }