I'm writing my first Xamarin.Forms MVVM application and I'm writing the view entirely with XAML. I need to be able to detect when the user taps a Xamarin.Forms.Label and to do so I've followed the example in the following Xamarin guide:
And my Label's XAML looks like this:
<Label Text="Test Check">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OnClickCheckOption}"
CommandParameter="TestCheck" />
</Label.GestureRecognizers>
</Label>
This causes a run-time error when the app starts that states:
"An exception of type Xamarin.Forms.Xaml.XamlParseException' occured in Xamarin.Forms.Xaml.DLL but was not handled in user code. Additional information: BindableProperty CommandProperty not found on TapGestureRecognizer"
The error that there is no CommandProperty or CommandParameterProperty on the Xamarin.Forms.TapGestureRecognizer class is clearly not true according to the Xamarin API:
http://iosapi.xamarin.com/?link=T%3aXamarin.Forms.TapGestureRecognizer%2f*
Does anyone know what I'm doing wrong? Any help is greatly appreciated, thanks in advance!