What's the difference between the ItemTapped and the ItemSelected event on a ListView in Xamarin.Forms?

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

  • tapping two times the same item should fire two times ItemTapped, and only once ItemSelected
  • tapping two times, on different items, should fire ItemTapped two times, and ItemSelected two times