/// <summary> /// Handles the Cancel button click event. /// </summary> /// <returns>A task that represents the asynchronous operation.</returns> protected Task OnCancelClicked() { return(InvokeAsync(async() => { await ModalRef.Hide(); if (IsConfirmation && Callback != null) { await InvokeAsync(() => Callback.SetResult(false)); } await Canceled.InvokeAsync(); })); }