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

afsaltafsalt Member ✭✭
edited February 14 in Xamarin.Forms

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.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    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?

  • afsaltafsalt Member ✭✭

    @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.

  • LandLuLandLu Member, Xamarin Team Xamurai

    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.

  • afsaltafsalt Member ✭✭

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

  • LandLuLandLu Member, Xamarin Team Xamurai

    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.

Sign In or Register to comment.