InkRecognizerBaseCollection.Item 属性

获取指定索引处的元素。

命名空间:  System.Windows.Ink.AnalysisCore
程序集:  IACore(在 IACore.dll 中)

语法

声明
Public ReadOnly Property Item ( _
    index As Integer _
) As InkRecognizerBase
用法
Dim instance As InkRecognizerBaseCollection
Dim index As Integer
Dim value As InkRecognizerBase

value = instance.Item(index)
public InkRecognizerBase Item[
    int index
] { get; }
public:
property InkRecognizerBase^ Item[int index] {
    InkRecognizerBase^ get (int index);
}
/** @property */
public InkRecognizerBase get_Item(
    int index
)
JScript 不支持索引属性。

参数

  • index
    类型:System.Int32
    要获取的元素的从零开始的索引。

属性值

类型:System.Windows.Ink.AnalysisCore.InkRecognizerBase
指定索引处的元素。

备注

备注

在 C# 中,请按照 C# 示例所示使用集合的索引器,不要使用集合的 Item 属性。

示例

下面的示例获取 InkRecognizerBaseCollection (theInkRecognizerCollection) 中的第一个识别器(如果该集合不为空)。此示例还检查该集合是否是同步的。

' Create a collection of the recognizers installed on this Tablet PC.
Dim theInkRecognizerCollection As InkRecognizerBaseCollection = _
    theInkAnalyzerBase.GetInkRecognizersByPriority()

' Check if there are recognizers in the collection.
If (0 < theInkRecognizerCollection.Count) Then
    ' Get the first recognizer in the collection.
    Dim theFirstInkRecognizer As System.Windows.Ink.AnalysisCore.InkRecognizerBase = _
        theInkRecognizerCollection.Item(0)

    ' Check if the recognizers collection is synchronized.
    If (theInkRecognizerCollection.IsSynchronized) Then
        ' Insert code here.
    End If
End If
            // Create a collection of the recognizers installed on this Tablet PC.
            InkRecognizerBaseCollection theInkRecognizerCollection =
                theInkAnalyzerBase.GetInkRecognizersByPriority();

            // Check if there are recognizers in the collection.
            if (0 < theInkRecognizerCollection.Count)
            {
                // Get the first recognizer in the collection.
                InkRecognizerBase theFirstInkRecognizer =
                    theInkRecognizerCollection[0];

                // Insert code here.
            }

            // Check if the recognizers collection is synchronized.
            if (theInkRecognizerCollection.IsSynchronized)
            {
                // Insert code here.
            }

平台

Windows Vista, Windows XP SP2, Windows Server 2003

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkRecognizerBaseCollection 类

InkRecognizerBaseCollection 成员

System.Windows.Ink.AnalysisCore 命名空间