GestureRecognizer.Reset Method
Clears the GestureRecognizer object of past stroke information.
Namespace: Microsoft.StylusInput
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub Reset
'Usage
Dim instance As GestureRecognizer
instance.Reset()
public void Reset()
public:
void Reset()
public function Reset()
Examples
This C# example is a snippet from a menu item's Click event handler. When a user checks the MenuItem object, theMenuItemMultistroke, the GestureRecognizer object, theGestureRecognizer, recognizes multistroke gestures. When a user clears theMenuItemMultistroke, theGestureRecognizer recognizes single-stroke gestures. The Reset method clears theGestureRecognizer of old stroke information.
using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;
// ...
// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;
// ...
// The Multistroke menu item's Click event handler.
private void theMenuItemMultistroke_Click(object sender, System.EventArgs e)
{
// Update the Multistroke menu item's checked state.
this.theMenuItemMultistroke.Checked = !this.theMenuItemMultistroke.Checked;
// Update the maximum stroke count for and reset gesture recognition.
this.theGestureRecognizer.MaxStrokeCount =
(this.theMenuItemMultistroke.Checked) ? 2 : 1;
this.theGestureRecognizer.Reset();
}
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
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