Exemplo n.º 1
0
        /// <summary>
        /// Handles the OK button click event.
        /// </summary>
        /// <returns>A task that represents the asynchronous operation.</returns>
        protected Task OnOkClicked()
        {
            return(InvokeAsync(async() =>
            {
                await Okayed.InvokeAsync();

                await ModalRef.Hide();
            }));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Handles the <see cref="Snackbar.Snackbar"/> closing event.
 /// </summary>
 /// <param name="eventArgs"></param>
 /// <returns></returns>
 protected virtual Task OnSnackbarClosed(SnackbarClosedEventArgs eventArgs)
 {
     return(eventArgs.CloseReason == SnackbarCloseReason.UserClosed
         ? Okayed.InvokeAsync()
         : Closed.InvokeAsync());
 }