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.