Provides gesture and manipulation recognition, event listeners, and settings.
public ref class GestureRecognizer sealed
We recommend the following techniques for handling GestureRecognizer events:
Use the target or currentTarget property of the event object instead of the GestureRecognizer object in the event handler:
The following pseudocode shows how you might set up a generic event handler for a GestureRecognizer object.
function initialize()
{
myGestureRecognizer = new Windows.UI.Input.GestureRecognizer();
myGestureRecognizer.addEventListener('someevent', that.someeventhandler);
}
function someeventhandler = function (ev) {
ev.target.somemethod();
}
Set the event handler to null if it is no longer needed:
myGestureRecognizer.someeventhandler = null;
For more information on how to listen to and handle Windows Runtime events, see Using the Windows Runtime in JavaScript.
Note This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).
Namespace: Windows.UI.Input
Metadata: windows.winmd