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

TapGestureRecognizer on stack inside ViewCell

$
0
0

Is it possible to get a tap on a stacklayout inside a ViewCell? It seems like ViewCell takes all the taps.

`public class MobileView : ViewCell
{
public MobileView (Employee profile)
{
var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (s, e) => {
// handle the tap
};

        var msgStack = new StackLayout {
            HorizontalOptions = LayoutOptions.EndAndExpand,
            Children = {
                new Image { Source = "conversations_icon.png" }
            }
        };

        msgStack.GestureRecognizers.Add(tapGestureRecognizer);
    }
    View = msgStack;

}`


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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