I created display action sheet in Xamarin forms with the following code ,
DisplayActionSheet ("ActionSheet: Send to?", "Cancel", null, "Email", "Twitter", "Facebook");
Is it possible to set button event for Email,Twitter,Facebook?
DisplayAction returns Task<string>, in order not to block the main thread. To handle selection you need to use it in a way similar to this:
var action = await DisplayActionSheet ("ActionSheet: Send to?", "Cancel", null, "Email", "Twitter", "Facebook");
switch (action){
case "Email":
DoSomething();
break;
case "Twitter":
DoSomethingElse();
break;
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With