Пример #1
0
        private async void ShowConfirmationDialogWithContentButtonClickHandler(object sender, RoutedEventArgs args)
        {
            ConfirmationDialogArguments dialogArgs = new ConfirmationDialogArguments
            {
                Title         = "Sports",
                Message       = "Which sports do you enjoy?",
                OkButtonLabel = "OK",
                CustomContent = FindResource("SimpleTextBox")
            };

            await ConfirmationDialog.ShowDialogAsync(MainWindow.DialogHostName, dialogArgs);
        }
Пример #2
0
        private async Task ShowConfirmationDialogAsync(bool stackedButtons)
        {
            ConfirmationDialogArguments dialogArgs = new ConfirmationDialogArguments
            {
                Title             = "Delete files",
                Message           = "Do you really want to permanently delete all files?",
                OkButtonLabel     = "DELETE",
                CancelButtonLabel = "CANCEL",
                StackedButtons    = stackedButtons
            };

            bool result = await ConfirmationDialog.ShowDialogAsync(MainWindow.DialogHostName, dialogArgs);

            System.Diagnostics.Debug.WriteLine($"{typeof(ConfirmationDialog)} result: {result}");
        }