共用方式為


InkRecognizerCollection.Item 屬性

取得位於指定之索引處的項目。

命名空間:  System.Windows.Ink
組件:  IAWinFX (在 IAWinFX.dll 中)

語法

'宣告
Public ReadOnly Property Item ( _
    index As Integer _
) As InkRecognizer
'用途
Dim instance As InkRecognizerCollection
Dim index As Integer
Dim value As InkRecognizer

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

參數

  • index
    型別:System.Int32
    要取得之項目的索引 (以零起始)。

屬性值

型別:System.Windows.Ink.InkRecognizer
位於指定之索引處的項目。

備註

注意:在 C# 中,請使用集合的索引子 (如下列 C# 範例所示),而不要使用集合的 Item 屬性。

範例

在下列範例中,如果 InkRecognizerCollection (theInkRecognizerCollection) 不是空集合,則會取得這個集合內的第一個辨識器。這個範例還會檢查集合是否同步。

' Get a collection of the recognizers installed on this Tablet PC.
Dim theInkRecognizerCollection As InkRecognizerCollection = _
    theInkAnalyzer.GetInkRecognizersByPriority()
' Check if there are recognizers in the collection.
If 0 < theInkRecognizerCollection.Count Then

    ' Get the first recognizer in the collection.
    Dim theFirstInkRecognizer As InkRecognizer = theInkRecognizerCollection(0)

    ' Insert code here.

End If

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

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

    // Insert code here.
}

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

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkRecognizerCollection 類別

InkRecognizerCollection 成員

System.Windows.Ink 命名空間