Using the Microsoft Gesture Recognizer Only
To use an ink collector to access the gesture recognizer:
- Set the CollectionMode property of the ink collector to either InkAndGesture mode or GestureOnly mode.
inkOverlay.CollectionMode = CollectionMode.GestureOnly;
- Choose the gesture that you want to support.
- Implement an event handler that receives gesture notifications. In the event handler, you need to implement the action corresponding to each event received.
Note Mixed mode supports only single-stroke gestures. Gesture mode supports multiple stroke gestures.
inkOverlay.Gesture += new InkCollectorGestureEventHandler(inkOverlay_Gesture);
In InkAndGesture mode, each individual stroke is sent to the Microsoft gesture recognizer. If it is recognized as a gesture that you have enabled, an event notification is sent. If the application accepts the event notification, the stroke is erased. If the application does not accept the notification or if the stroke is not recognized to be a gesture, the stroke is stored in the Ink object.
In GestureOnly mode, the strokes are delimited by timeouts before and after the strokes. The strokes collected within the timeout are sent to the recognizer. If the strokes are recognized as a gesture that you have enabled, an event notification is sent. The application may accept or reject the event, effecting the corresponding action or not. In gesture-only mode, the strokes are never saved in the Ink object.
Build date: 3/6/2012