Hi.
I've been messing around with different kind of listitems, and one type of cell that I want to use is a cell with a button in it bound to a command, which sounds simple. However during the implementation I found out doing this in Xamarin.Forms gives different results per platform, none of which is what I originally want.
The goal:
1) Click on the "Points++" to increase the points shown next to the Player. (It's bound to a command on the Cell's VM through setbinding on .CommandProperty)
2) Click anywhere else on the list item to navigate to a detailed view of the player. (It's bound to a command on the Page's VM thought ListView.ItemTapped)
Looks like:
Results on Windows Phone:
1) Clicking on the Points++ button increases the points shown next to the player (So Cell VM command is fired), BUT ALSO navigates to the detailed View of a player (Page command is fired). I want to block the ListView's "OnClicked" from firing when a command within the cell has already been activated.
2) Clicking anywhere else on the list item navigates to the detailed view of the player, working as I want.
Results on Android:
1) Clicking on the Points++ button increases the points shown next to the player, working as intended.
2) Clicking anywhere else on the list item does nothing. It seems by button that button on there the ListView no longer gets its ItemTapped fired when I click on it because the cell itself has already requested to listen to it, or something. But when the cell didn't get a click event ON an actual clickable component, I want it to fire ListView's OnTapped anyway.
I put the sample code for this in a seperate github project, the code might give a better explanation than the above text.
https://github.com/SanderE/ListWithCommands/
Is there any way to make all platforms (I can't test iOS right now, but obviously I want the same thing there) behave as I'd want, to keep ListItems as a whole clickable but if there's specific items within that listItem that take touch input, they have to take precedence over the overall ListItem touch?