Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Created November 26, 2018 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeM-RP/14ad34db30d25955e2b4590ffa66d5a4 to your computer and use it in GitHub Desktop.
Save JoeM-RP/14ad34db30d25955e2b4590ffa66d5a4 to your computer and use it in GitHub Desktop.
private async Task ShowActionSheet()
{
var response = await _dialogService.DisplayActionSheetAsync("Actions", "Cancel", "Destroy", new string[] { "Action1", "Action2" });
// TODO: Like with the Error Dialog, we want to perform different actions based on the user selection
switch (response)
{
case ("Action1"):
case ("Action2"):
default:
await _dialogService.DisplayAlertAsync("I did it!", $"Selected {response}", "Ok");
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment