Example #1
0
 public Task <bool?> ShowCustomContentAsync(
     View view,
     string message,
     string title          = null,
     string confirmingText = "Ok",
     string dismissiveText = "Cancel",
     MaterialAlertDialogConfiguration configuration = null)
 {
     return(MaterialDialogFragment.ShowAsync(view, message, title, confirmingText, dismissiveText, configuration));
 }
        public static async Task <bool?> ShowAsync(View view, string message, string title, string positiveButtonText, string negativeButtonText, MaterialAlertDialogConfiguration configuration)
        {
            var d = new MaterialDialogFragment(configuration);

            d.container.Content   = view ?? throw new ArgumentNullException(nameof(view));
            d.DialogTitle.Text    = title;
            d.Message.Text        = message;
            d.PositiveButton.Text = positiveButtonText;
            d.NegativeButton.Text = negativeButtonText;

            await d.ShowAsync();

            return(await d.InputTaskCompletionSource.Task);
        }