次の方法で共有


InkEdit.GetGestureStatus メソッド

InkEdit オブジェクトが特定のアプリケーション ジェスチャを待機しているかどうかを示す値を返します。

名前空間 :  Microsoft.Ink
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public Function GetGestureStatus ( _
    gesture As ApplicationGesture _
) As Boolean
'使用
Dim instance As InkEdit
Dim gesture As ApplicationGesture
Dim returnValue As Boolean

returnValue = instance.GetGestureStatus(gesture)
public bool GetGestureStatus(
    ApplicationGesture gesture
)
public:
bool GetGestureStatus(
    ApplicationGesture gesture
)
public boolean GetGestureStatus(
    ApplicationGesture gesture
)
public function GetGestureStatus(
    gesture : ApplicationGesture
) : boolean

パラメータ

戻り値

型 : System.Boolean
InkEdit コントロールが特定のアプリケーション ジェスチャを待機しているかどうか。

説明

true

InkEdit コントロールはジェスチャを待機しています。ジェスチャが認識されたときに Gesture イベントが発生します。

false

InkEdit コントロールはジェスチャを待機していません。

解説

このメソッドは、gesture パラメータが ApplicationGesture に設定されている場合は例外をスローします。

InkEdit コントロールが特定のジェスチャを待機するように設定するには、SetGestureStatus メソッドを呼び出します。

ms569262.alert_note(ja-jp,VS.90).gifメモ :

既定では、InkEdit コントロールは、次のアプリケーション ジェスチャを待機します。

この C# の例では、InkEdit コントロール theInkEdit が待機するアプリケーション ジェスチャすべてを含む ArrayList を作成します。

using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkEdit control.
private ApplicationGesture [] GetSetAppGestures(InkEdit theInkEdit)
{
    ArrayList result = new ArrayList();
    ApplicationGesture test = ApplicationGesture.NoGesture;
    Array gestureArray = System.Enum.GetValues(test.GetType());
    foreach (ApplicationGesture theGesture in gestureArray)
    {
        // ApplicationGesture.AllGestures is not a meaningful 
        // gesture to pass to GetGestureStatus()
        if (theGesture != ApplicationGesture.AllGestures && 
            theInkEdit.GetGestureStatus(theGesture))
        {
            result.Add(theGesture);
        }
    }
    return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}

この Microsoft® Visual Basic® .NET の例では、InkEdit コントロール theInkEdit が待機するアプリケーション ジェスチャすべてを含む ArrayList を作成します。

Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkEdit control.
Private Function GetSetAppGestures(ByVal theInkEdit As InkEdit) _
    As ApplicationGesture()
    Dim result As New ArrayList()
    Dim test As ApplicationGesture = ApplicationGesture.NoGesture
    Dim theGestures As Array = System.Enum.GetValues(test.GetType())
    Dim theGesture As ApplicationGesture
    For Each theGesture In theGestures
        ' ApplicationGesture.AllGestures is not a meaningful 
        ' gesture to pass to GetGestureStatus()
        If (Not theGesture.Equals(ApplicationGesture.AllGestures)) AndAlso _
            theInkCollector.GetGestureStatus(theGesture) Then
            result.Add(theGesture)
        End If
    Next
    Return CType(result.ToArray(test.GetType()), ApplicationGesture())
End Function

プラットフォーム

Windows Vista

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

InkEdit クラス

InkEdit メンバ

Microsoft.Ink 名前空間

ApplicationGesture

InkEdit.Gesture

InkEdit.SetGestureStatus