locked
grid tapgesture command executing slowly when randomly clicked and not all clicks are marking in uwp RRS feed

  • Question

  • User392787 posted

    I have a custom grid, inside that I added a Bindable property Command. When I am randomly clicking the grid not all clicks are marking. When I tested the random click speed with respect to button click command and tap gesture command, then button click command executes fast and all clicks are counting. This issue is present in the UWP app only. Can anyone suggest any way to register/count all clicks happening to a grid to be marked? The issue is present all tap gesture commands in UWP app not in iOS and Android.

    Friday, February 14, 2020 3:50 AM

All replies

  • User369979 posted

    When I am randomly clicking the grid not all clicks are marking. What do you mean the "all clicks"? When I tested the random click speed with respect to button click command and tap gesture command, then button click command executes fast and all clicks are counting. If you put a button on your Grid then its command instruction will intercept the TapGestureRecognizer of the parent Grid so that the tap command of Grid won't be triggered. This is a normal behavior even on iOS and Android. I'm still confused about what you want to achieve here. Could you please specify your requirements with some screenshots and code?

    Friday, February 14, 2020 6:52 AM
  • User392787 posted

    @LandLuI have a custom grid which is bound to a command(Command is a bindable property). After that, I am assigning tapgesture command to that custom command. Clicks are working fine but when I click randomly like 8 times in one second then all clicks are not counting or marking. It is taking 5 or 4 clicks instead of 8. I am using async command action. In case of android and iOS it is taking 8 clicks. This issue is coming only in UWP I tested the speed of clicks in button command and tap gesture command but tap gesture command is slow and not all clicks are counting in case of random clicks.

    Friday, February 14, 2020 9:59 AM
  • User369979 posted

    It is weird if you tapped very quickly with a short interval. There's a NumberOfTapsRequired of TapGestureRecognizer so if you tapped it too fast it will be recognized as a double-tapped command. There are different mechanisms between different platforms so it will display different behaviors when you test this. My suggestion is to avoid this kind of tapping behavior.

    Friday, February 14, 2020 10:37 AM
  • User392787 posted

    @LandLu But in case of Android and iOS it is working fine. I don't know why it is happening?

    Monday, February 17, 2020 3:45 AM
  • User369979 posted

    There are different mechanisms between different platforms as I said above. You could try to raise an issue here https://github.com/xamarin/Xamarin.Forms/issues to post your request.

    Monday, February 17, 2020 9:57 AM