A ListView in Xamarin.Forms has two events, which seem to be exactly the same: ItemTapped and ItemSelected
There isn't really any documentation about these, so what exactly is the difference?
ItemSelected is a state while ItemTapped is a motion event. All views can be tapped and if I remember correctly all views can be selected (or at least activated there is a subtle difference), the two don't have to go together but they usually do.
For example you'd have an item's selected state toggled each time a tapped motion event has occurred. Once again just to make it more clear you can associate the changes of the selected state to whatever you need whether it's a motion event like tapping or long pressing or double tapping and so on or to some other event or logic.
Hope it helps and good luck!
ItemTapped should occur every time you click on an item, while ItemSelected every time the selected item has changed.
Basically
ItemTapped, and only once ItemSelected
ItemTapped two times, and ItemSelected two timesItemSelected occurs first. ItemTapped occurs second.
One major difference worth noting is how they work when the SelectionMode="None"
<ListView ... SelectionMode="None" />
When set to "None"...the ItemSelect event will not fire and SelectedItem property remains null.
But
ItemTappedevents will continue to fire as expected.
ListView interactivity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With