Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Get the event sender with async

$
0
0

I have a code like this

var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += async (s, e) => {
// handle the tap
var action = await DisplayActionSheet ("ActionSheet: Save Photo?", "Cancel", "Delete", "Photo Roll", "Email");
Debug.WriteLine("Action: " + action);
Debug.WriteLine("Action: " + sender);
};
image.GestureRecognizers.Add(tapGestureRecognizer);

I get unknown identifier sender. How do I get the sender when I am using async?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>