Bug 30467 - We need a mechanism to extend and provide our own gestures
Summary: We need a mechanism to extend and provide our own gestures
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Mac OS
: --- enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-26 16:09 UTC by George Cook
Modified: 2017-11-16 07:46 UTC (History)
14 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED ANSWERED

Description George Cook 2015-05-26 16:09:41 UTC
there is no api (or guidance) on how to add our own gestures.

This is odd, seeing how easy it would be for us to do this. This exasperates the fact we only have one gesture right now (tap).

Can you guys please give us hooks (via base class, or meaningful interface) to be able to add our own gesture recognition?
Comment 1 George Cook 2015-05-27 01:05:11 UTC
I've created a mechanism to easily create gestures for xamarin forms. I've implemetned the iOS ones. It's all composition, none of that mr gestures inheritence silliness. It uses your own mechanism (the GestureRecognizers list) so it's ready to implement.

There's a video and code examples.

http://forums.xamarin.com/discussion/comment/127163#Comment_127163

I'll open source this and blog about it next week..

there are 2 things.

1. I have to currently add an extension method and call it to wire up the gestures, becasue you guys don't expose any hooks. Can you please add an AddRecognizer/RemoveRecognizer method to your IGestureRecognizer interface, so that you can communicate with our 3rd party gesture recognizers?

2. I have to use reflection to get to the renderers for views. Please please please please change this. I am doing some crazy powerful stuff with Xamarin, and the mechanism that allows me to do so many great things is getting access to a view's *current* renderer (i.e. not having to create it using Renderer.GetRenderer. If you open that up, it will make a lot of us who are pioneering, experimenting and really pushing the boat on what xamarin forms can do way more comfortable.
Comment 2 George Cook 2015-05-27 01:08:04 UTC
btw - the implementaiton is at the end of that forum post. To make life easier for you, here's the vid.

https://youtu.be/ksAyyIzEK54
Comment 3 Andrei.N 2015-05-27 04:20:55 UTC
George's work is awesome, gesture support in a cross-platform way with Xamarin Forms is very much needed
Comment 4 Andrei.N 2015-05-27 09:01:33 UTC
Meanwhile, I did my own implementation too, screencast of a small demo here https://www.youtube.com/watch?v=utwawqSilGo
Comment 5 david 2015-05-28 18:57:39 UTC
I would love to see this made possible in Xamarin Forms, along with an official mechanism to get hold of the renderer for a Xamarin Forms View / Page object.
Comment 6 Geoffrey Huntley 2015-09-12 02:32:18 UTC
Yes, please.
Comment 7 George Cook 2015-09-29 17:14:28 UTC
I've just pinged support about this again. Months and no updates. Come on guys...
Comment 8 Cliff Cawley 2016-03-13 23:29:54 UTC
Putting my vote in for this too
Comment 9 Gagik Kyurkchyan 2016-03-22 11:32:09 UTC
Please implement this!
Comment 10 Jason Smith [MSFT] 2016-04-09 00:26:04 UTC
Thank you for taking the time to submit this feature request. We like this idea and have added it to our internal feature tracking system.

Warm regards,
Xamarin Forms Team
Comment 11 nicollas braga 2016-09-02 14:06:47 UTC
Xamarin Team, We really need this right now please!
Comment 12 Dimitar Dobrev 2017-11-06 17:07:26 UTC
Any news on this bug? You have completed some of the work by exposing GetRenderer but the author (George Cook) still needs other workarounds such as ProcessGestureRecognizers. It's bad enough that you haven't added basic gestures for years now but you also obstruct other people's attempts by hiding your API.
By the way, George Cook's work is excellent. In addition to gestures he's also done another piece of your work - fast cells in list view. His examples at https://github.com/twintechs/TwinTechsFormsLib clearly show his cells are much faster than yours so you should definitely look into using his code instead.