I have a view with an image that has a tap gesture bound to a command:
VIEW:
var clickableImage = new Image(...);
var imageTap = new TapGestureRecognizer();
clickableImage.GestureRecognizers.Add(imageTap);
imageTap.SetBinding<MyViewModel>(TapGestureRecognizer.CommandProperty, _ => _.MyCommand);
The command is in the view model like this:
VIEW MODEL
public ICommand MyCommand
{
get
{
return new Command((parameters) =>
{
// Can I access imageTap element here?
});
}
}
Is there any way to access the imageTap element from within the command that it's bound to?