次の方法で共有


InkOverlay.GetGestureStatus メソッド

特定のアプリケーション ジェスチャ内で InkOverlay オブジェクトが対象を持つかどうかを示す値を返します。

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

構文

'宣言
Public Function GetGestureStatus ( _
    gesture As ApplicationGesture _
) As Boolean
'使用
Dim instance As InkOverlay
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
InkOverlay オブジェクトが特定のアプリケーション ジェスチャ内に対象を持つかどうか。

説明

true

InkOverlay オブジェクトはジェスチャに対象を持ちます。Gesture イベントは、ジェスチャが認識されたときに発生します。

false

InkOverlay オブジェクトはジェスチャに対象を持ちません。

解説

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

特定のジェスチャに対して InkOverlay オブジェクトの対象を設定するには、SetGestureStatus メソッドを呼び出します。

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

既定では、InkOverlay オブジェクトはアプリケーション ジェスチャ内で対象を持ちません。

この C# の例では、InkOverlay オブジェクト theInkOverlay が対象を持つアプリケーション ジェスチャすべてを含む ArrayList を作成します。

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

この Microsoft Visual Basic .NET の例では、InkOverlay オブジェクト theInkOverlay が対象を持つアプリケーション ジェスチャすべてを含む ArrayList を作成します。

Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkOverlay object.
Private Function GetSetAppGestures(ByVal theInkOverlay As InkOverlay) As ApplicationGesture()
    Dim result As New ArrayList()
    Dim sampleGesture As ApplicationGesture = ApplicationGesture.NoGesture
    Dim theGestures As Array = System.Enum.GetValues(sampleGesture.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 _
            theInkOverlay.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

参照

参照

InkOverlay クラス

InkOverlay メンバ

Microsoft.Ink 名前空間

ApplicationGesture

InkOverlay.Gesture

InkOverlay.SetGestureStatus