Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Currently Xamarin Forms does not have a click event handler, but rather relies on a 1-tap tap gesture recognizer for that. On platforms such as Android that have click handlers, you currently manually trigger 1-tap tap gesture recognizers in the onClick handlers using ad-hoc code.
However, this design is misguided.
The reason is that some platforms like Android support interacting with a keyboard, mouse and d-pad in addition to touch, which means that clicks are not only caused by touch, but also by those devices; also, accessibility tools probably use clicks as well.
Furthermore, a tap gesture recognizer should provide the (x, y) coordinates of the touch, which you obviously can't do if you try to translate clicks to tap gestures (since they might be the result of keyboard or d-pad interaction).
Instead, there should be a Clicked event or a similar mechanism and applications should use that rather than a tap recognizer, unless they need to explicitly recognize and act only on touch taps.
And of course, on platforms that don't have a native click event, you should write code to trigger the click event from a tap gesture recognizer (rather than the opposite as you are doing now).
Thank you for your feature request. We will take your comments into consideration.