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

ItemTapped event of ListView is firing while using Tapped event of any control on ListView in WinRT

$
0
0

In WinRT (Windows) platform, tapping any control on ListView, calling ItemTapped event of ListView. For example I have image control on ListView. On tap of image I am changing its state as below.

    Image checkUncheck = new Image();
    checkUncheck.SetBinding(Image.ClassIdProperty, "ContactIdString");

    var checkUncheckTapRecognizer = new TapGestureRecognizer();
    checkUncheckTapRecognizer .Tapped +=(object sender, EventArgs e) => {
        if(Convert.ToBoolean(checkUncheck .StyleId))
        {
            checkUncheck .Source = _uncheckedImage;
            checkUncheck .StyleId = "False";
        }
        else
        {
            checkUncheck .Source = _checkedImage;
            checkUncheck .StyleId = "True";
        }

    };
checkUncheck.GestureRecognizers.Add(checkUncheckTapRecognizer );

I am adding this control to ListView. On ListView item tap, I am loading another page. Now on tap of image control on ListView its changing the state, but going to another page immediately.


Viewing all articles
Browse latest Browse all 76418

Trending Articles



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