Exemplo n.º 1
0
 public Task <int> SelectActionAsync(
     string title,
     IList <string> actions,
     MaterialSimpleDialogConfiguration configuration = null)
 {
     return(MaterialSimpleDialog.ShowAsync(title, actions, configuration));
 }
        internal static async Task <int> ShowAsync(string title, IEnumerable <string> actions, MaterialSimpleDialogConfiguration configuration = null)
        {
            var dialog = new MaterialSimpleDialog(configuration)
            {
                InputTaskCompletionSource = new TaskCompletionSource <int>(), DialogTitle = { Text = title }
            };

            dialog.CreateActions(actions.ToList(), configuration);

            await dialog.ShowAsync();

            return(await dialog.InputTaskCompletionSource.Task);
        }