CollectionMode Enumeration

Defines values that determine whether ink, gestures, or ink and gestures are recognized as the user writes.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Enumeration CollectionMode
'Usage
Dim instance As CollectionMode
public enum CollectionMode
public enum class CollectionMode
public enum CollectionMode

Members

Member name Description
InkOnly Collects only ink, creating a stroke. The InkCollector.Gesture, InkOverlay.Gesture, or InkPicture.Gesture event interest is set to false, meaning that gestures are not collected (all other event interests remain as they were).
GestureOnly Collects only gestures and does not create a stroke. Gestures can be either single- or multi-stroke. Multi-stroke gestures are accepted if the strokes are made within the time set by the built-in timer of the recognizer. All stroke-related and packet-related events do not fire from the InkCollector object, InkOverlay object, or InkPicture control. Cursor events fire, and ink is always deleted. The InkCollector.Gesture, InkOverlay.Gesture, or InkPicture.Gesture event interest is set to true, meaning that gestures are collected (all other event interests remain as they were).
InkAndGesture Accepts only single-stroke gestures. The InkCollector.Gesture, InkOverlay.Gesture, or InkPicture.Gesture event fires first, allowing you to cancel or accept the event. The default is to accept the event, except when the NoGesture value from ApplicationGesture, is the primary gesture. If the gesture is accepted, the ink is deleted. If the gesture is canceled, the stroke is not deleted and a InkCollector.Stroke, InkOverlay.Stroke, or InkPicture.Stroke event fires. The InkCollector.Gesture, InkOverlay.Gesture, or InkPicture.Gesture event interest is set to true, meaning that gestures are collected (all other event interests remain as they were).

Remarks

If a user attempts a right-click and moves the pen when in the InkOnly or InkAndGesture mode, ink flows from the pen tip. When handling the InkCollector.Stroke, InkOverlay.Stroke, or InkPicture.Stroke event, erase the ink that flowed as a result of the pen movement.

When the InkCollector.CollectionMode, InkOverlay.CollectionMode, or InkPicture.CollectionMode property is set to GestureOnly, the timeout between when a user adds a gesture and when the InkCollector.Gesture, InkOverlay.Gesture, InkPicture.Gesture event occurs is a fixed value that cannot be altered programmatically. Gesture recognition is faster in the InkAndGesture mode. To prevent the collection of ink while in the InkAndGesture mode, you can:

When using this enumeration with the InkPicture control, or the InkCollector or InkOverlay objects, on a system that has the Microsoft® Windows® XP Tablet PC Edition Software Development Kit (SDK) installed but that does not have recognizers installed, the mode cannot be set to GestureOnly or InkAndGesture.

Typical scenarios for each collection mode follow.

Note

If the cursor does not move out of range of the collection object between strokes, the cursor in range and the cursor out of range events do not fire.

Unwanted behavior might occur when the InkCollector.CollectionMode, InkOverlay.CollectionMode, or InkPicture.CollectionMode property is set to and the interest of an object or control in a known gesture is set (by calling the InkCollector.SetGestureStatus, InkOverlay.SetGestureStatus, or InkPicture.SetGestureStatus method). If a user draws ink that resembles a gesture that is in the recognizer's list of alternates, the gesture event fires and ink disappears, even if the gesture is not the top alternate. To prevent the ink from disappearing and to cancel collection of the gesture, set the inherited Cancel property of the InkCollectorGestureEventArgs to true if you do not want the recognizer to respond to that event.

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Microsoft.Ink Namespace

InkCollector.CollectionMode

InkOverlay.CollectionMode

InkPicture.CollectionMode