Closed grounch closed 3 years ago
I propose you to bind TapGestureRecognizer.Command to your view's command.
<ContentPage x:Name="Page"
...
<Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TapCommand, Source={x:Reference Page}}"/>
</Grid.GestureRecognizers>
Then in code-behind add TapCommand and handle click)
Feel free to ask more questions :)
Hi just noticed an issue with tapgestures. If i want to assign an event handler to tapped event of tapgesture on an element nested in a CarouselView, it gives the following error at build:
Error: Common Language Runtime detected an invalid program
Works well with the Command="..." property to bind a command from the viewmodel, but i need to use an eventhandler in the view's .cs .