次の方法で共有


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

参照

参照

GestureRecognizer クラス

GestureRecognizer メンバ

Microsoft.StylusInput 名前空間