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

Adding two Images to the same Grid Row, causing TapGestureRecognizer to only fire on the last added

$
0
0

Has anyone tried this before? I've been banging my head against the wall for hours trying to figure out what was happening, since on of my images would not detect a touch event.
I use the Command from TapGestureRecognizer to capture user touching an Image, but since i had two images in the same grid row, with two different TagGestureRecognizers, only the last added to the Grid would work, leaving the first added image "untappable".

Heres is an example of how i used the TapGestureRecognizers with my images

var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Command = new Command(() =>
{
// Do important stuff when user touch image
});
myImage.GestureRecognizers.Add(tapGestureRecognizer);

Just curious to see if anyone has tried anything similar with the TapGestureRecognizer not working as expected.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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