Xamarin.Forms Checkbox event to command

In Xamarin.Forms Checkbox has a Checked event but no command. Xamarin Community Toolkit provides EventToCommandBehavior to convert event to command. This can be used when we have a single checkbox. For checkbox in a CollectionView somehow it didn’t worked. For that we will use a different approach.

For single checkbox EventToCommandBehavior this works really well. Here is how to use it:

Vieiwmodel:

For Checkbox in a Collection View a workaround is used as the above solution didn’t work:

Checkbox in a collection view.

It’s not a very elegant way but works until it’s fixed in the Xamarin Community toolkit.