Catel.Xamarin.Forms.ArgumentsProxyFactory.CreateAlertArgument C# (CSharp) Méthode

CreateAlertArgument() public static méthode

Creates a proxy for Xamarin.Forms.AlertArgument.
public static CreateAlertArgument ( string caption, string message, string positiveButton, string negativeButton ) : IArgumentsProxy
caption string The caption
message string The message
positiveButton string The positive button text
negativeButton string The negative button text
Résultat IArgumentsProxy
        public static IArgumentsProxy CreateAlertArgument(string caption, string message, string positiveButton,
            string negativeButton)
        {
            return new AlertArgumentsProxy(caption, message, positiveButton, negativeButton);
        }

Usage Example

Exemple #1
0
        /// <summary>
        /// Sends the alert.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="message">The message.</param>
        /// <param name="positiveButton">The positive button.</param>
        /// <param name="negativeButton">The negative button.</param>
        /// <returns>System.Threading.Tasks.TaskCompletionSource&lt;System.Boolean&gt;.</returns>
        public static TaskCompletionSource <bool> SendAlert(Page sender, string caption, string message, string positiveButton, string negativeButton)
        {
            var argument = ArgumentsProxyFactory.CreateAlertArgument(caption, message, positiveButton, negativeButton);

            SendAlert(sender, argument);
            return(argument.Result);
        }
ArgumentsProxyFactory