Xamarin.Forms GridView ItemClick/Tap
muhaym opened this issue · comments
Abdul Muhaymin Arif commented
Referred your blog post for enabling Xamarin.Forms Gridview, but didn't find a way to pass command to event handler for ItemClick or Tap event.
Chase Florell commented
Thanks for reaching out.
You can either use the Command
and CommandParameter
binding, or you can attach a TapGestureRecognizer
to your ItemView
var tapGestureRecognizer = new TapGestureRecognizer
{
Command = Command,
CommandParameter = item1
};
Abdul Muhaymin Arif commented
Hi, Can you please provide an example, I have implemented GridView, and on click on any item, I want my View Model realize an item and which item is clicked, using Command or Command Parameter.
Also current GridView implementation is crashing in windows phone and uwp apps.