Distinguishing Gestures from Other Pen Input

A common user experience issue with gestures is considering how to differentiate from other types of pen input such as clicking and dragging, selecting, handwriting, and drawing. The following are some of the issues you can consider in your design:

Ink and gestures. Once you set interest in a gesture or set of gestures, the GestureRecognizer looks for those gestures whenever pen input occurs. If you have an area in which you have selected the InkAndGesture value from the InkCollectionMode enumeration, make the gestures as different from aniticipated ink input as possible.

Selection and gestures. If the user is working within an area that allows selection (for example, a text document), there's the additional question of whether a stroke was intended as a gesture, a selection, or click-and-drag action.

Multi-stroke gestures. Most of the gestures described in Choosing a Set of Gestures to Support are done with a single stroke, but some allow two strokes. Multi-stroke gestures are more prone to recognition error. The ink collecting objects only support multi-stroke gestures in the GestureOnly collection mode (more details about collection modes in the following section).


You can choose from a variety of approaches:

  • Separate gesture input by providing a separate area for it.
  • Provide a separate mode for handwriting and drawing. For example, the user could click a button to toggle to a handwriting mode, and toggle back to perform edits using gestures.
  • Require the user to hold the pen barrel button while performing a gesture (some Tablet PCs do not have pen buttons).

The ink collecting objects provide different InkCollectionMode settings that determine how pen input is handled. You need to choose between the following two ink collection modes that support gestures:

  • GestureOnly. Only gestures are recognized. No ink is drawn, and no strokes are created. There is a small time delay after the user completes the stroke, allowing for two-stroke gestures.
  • InkAndGesture. Both ink and gestures are recognized. Ink is drawn for a gesture, and then erased when the gesture is recognized and processed. If a stroke is recognized as a gesture and the application accepts the accompanying notification, the stroke is erased from the inking surface. This mode does not support multi-stroke gestures.
  • InkOnly. Gestures are not reported.



Send comments about this topic to Microsoft

Build date: 2/8/2011