GestureRecognizer.Reset 方法
清除旧笔画信息的 GestureRecognizer 对象。
命名空间: Microsoft.StylusInput
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Sub Reset
用法
Dim instance As GestureRecognizer
instance.Reset()
public void Reset()
public:
void Reset()
public void Reset()
public function Reset()
示例
此 C# 示例是菜单项的 Click 事件处理程序中的代码段。当用户选中 MenuItem 对象 theMenuItemMultistroke 时,GestureRecognizer 对象 theGestureRecognizer 识别多笔画笔势。当用户清除 theMenuItemMultistroke 时,theGestureRecognizer 识别单笔画笔势。Reset 方法清除旧笔画信息的 theGestureRecognizer。
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();
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0