InkCollectorGestureEventArgs.Gestures 属性

识别器 获取 Gesture 对象的数组(按置信度的顺序排列)。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public ReadOnly Property Gestures As Gesture()
用法
Dim instance As InkCollectorGestureEventArgs
Dim value As Gesture()

value = instance.Gestures
public Gesture[] Gestures { get; }
public:
property array<Gesture^>^ Gestures {
    array<Gesture^>^ get ();
}
/** @property */
public Gesture[] get_Gestures()
public function get Gestures () : Gesture[]

属性值

类型:array<Microsoft.Ink.Gesture[]
从识别器获取的 Gesture 对象的数组(按置信度的顺序排列)。

备注

有关应用程序笔势 的说明,请参见 ApplicationGesture 枚举。

当识别器识别应用程序笔势时将发生 Gesture 事件。

该数组包含有关应用程序笔势(而不是系统笔势)的信息。有关笔势的更多信息,请参见Using Gestures

示例

此 C# 示例创建一个 InkCollectorGestureEventHandler,它将可能的笔势的 Id 值按置信度的顺序写入 TextBox (theTextBox) 中。

private void theInkCollector_Gesture(object sender,
    Microsoft.Ink.InkCollectorGestureEventArgs e)
{
  for (int i = 0; i < e.Gestures.Length; i++)
  {
    theTextBox.Text += e.Gestures[i].Id.ToString();
    if (i < e.Gestures.Length - 1)
      theTextBox.Text += ", ";
  }
}

此 Microsoft(R) Visual Basic(R) .NET 示例创建一个 InkCollectorGestureEventHandler,它将可能的笔势的 Id 值按置信度的顺序写入 TextBox (theTextBox) 中。

Public Sub theInkCollector_Gesture(ByVal sender As Object, ByVal e As InkCollectorGestureEventArgs) _
Handles theInkCollector.Gesture
  Dim i As Integer
  For i = 0 To e.Gestures.Length - 1
    theTextBox.Text += e.Gestures(i).Id.ToString()
    If i < e.Gestures.Length - 1 Then
      theTextBox.Text = theTextBox.Text + ", "
    EndIf
  Next
End Sub

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkCollectorGestureEventArgs 类

InkCollectorGestureEventArgs 成员

Microsoft.Ink 命名空间

Gesture

Gesture.Id

InkCollector

InkCollector.Gesture