コード例 #1
0
 private void dialog_Click(object sender, RoutedEventArgs e)
 {
     FluentDialog.Show("Dialog", "This is a Dialog.", new FluentDialogOptions
     {
         CancelButtonVisibility = Visibility.Collapsed, DeleteButtonVisibility = Visibility.Collapsed
     });
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: MessageDialog.cs プロジェクト: zxbe/FluentUI-WPF
 private void CancelButton_Click(object sender, RoutedEventArgs e)
 {
     FluentDialog.TaskCompletionSource?.TrySetResult(DialogResult.Cancel);
     FluentDialog.Close();
 }