Michel Borges
Michel Borges

Reputation: 931

How do I manage Event to Command in Xamarin.Forms and MvxListView

I'm new to MvvmCross and I'm trying to bind my ItemTapped to an MvxCommand. I'm using MvvmCross 6.0.1, Xamarin.Forms and MvxListView component.

Thanks

Upvotes: 0

Views: 447

Answers (2)

rsr
rsr

Reputation: 21

MvxListView.ItemClicked might do the job. See for example the star wars API Mvvmcross sample.

Upvotes: 1

Almir Vuk
Almir Vuk

Reputation: 3173

Did you try to use Reusable EventToCommandBehavior made by Xamarin team. More info about it you can find on official Xamarin docs here.

Also there is a GitHub repository with source code and sample of using it here.

No matter if you are using MvxCommand it should work because even MvxCommand at some point is inheriting from ICommand

Wish you good luck with coding!

Upvotes: 0

Related Questions