InkRecognizerBaseCollection.Count 属性

获取集合的元素数。

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

语法

声明
Public ReadOnly Property Count As Integer
用法
Dim instance As InkRecognizerBaseCollection
Dim value As Integer

value = instance.Count
public int Count { get; }
public:
virtual property int Count {
    int get () sealed;
}
/** @property */
public final int get_Count()
public final function get Count () : int

属性值

类型:System.Int32
集合的元素数。

实现

ICollection.Count

示例

下面的示例获取 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 命名空间