Need advice on binding to use Commands
I have a ContentPage which has two ContentViews, the whole thing has one ViewModel.
In one of the views there is a CollectionView and in the DataTemplate for the items it has a Lable with a TapGestureRecognizer. Now that TapGestureRecognizer has an ICommand which handles the tap and this is where I have a problem.
I had to define the Command in the Class that is the Item. That works but is where the problem is. The tap event needs to set an ItemsSource and I have had to define the CollectionView as the parameter to the Command event in order for it to know where to set the ItemsSource.
What is the way (or is there a good way) to be able to do this without all the references to controls. The same problem would occur if I use the ViewModel property to bind the ItemsSource.