Recognizer.SupportedProperties 属性

获取一个 Guid 类型的数组,该数组描述 Recognizer 对象所支持的各种属性。

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

语法

声明
Public ReadOnly Property SupportedProperties As Guid()
用法
Dim instance As Recognizer
Dim value As Guid()

value = instance.SupportedProperties
public Guid[] SupportedProperties { get; }
public:
property array<Guid>^ SupportedProperties {
    array<Guid>^ get ();
}
/** @property */
public Guid[] get_SupportedProperties()
public function get SupportedProperties () : Guid[]

属性值

类型:array<System.Guid[]
Recognizer 对象所支持的属性。

备注

识别器 可支持行规格、行号和置信级别等等。有关识别器可支持的各种属性的完整列表,请参见 RecognitionProperty 对象。

示例

此示例中,将支持德语(语言 ID 1031)、RecognizerCapabilities 功能 LinedInput 以及 ConfidenceLevel 的第一个 Recognizer 分配给选定的 Recognizer 对象变量。

Dim selectedRecognizer As Recognizer = Nothing
Dim allRecognizers As Recognizers = New Recognizers()
For Each oneReco As Recognizer In allRecognizers
    ' if we haven't found the one we want yet
    If Not selectedRecognizer Is Nothing Then
        ' if supports LinedInput
        If (oneReco.Capabilities And RecognizerCapabilities.LinedInput) <> 0 Then
            For Each langID As Short In oneReco.Languages
                ' if supports German (1031)
                If langID = 1031 Then
                    For Each propertyGuid As Guid In oneReco.SupportedProperties
                        ' if supports ConfidenceLevel
                        If propertyGuid = RecognitionProperty.ConfidenceLevel Then
                            ' assign selected
                            selectedRecognizer = oneReco
                        End If
                    Next
                End If
            Next
        End If
    End If
Next
Recognizer selectedRecognizer = null;
Recognizers allRecognizers = new Recognizers();
foreach (Recognizer oneReco in allRecognizers)
{
    // if we haven't found the one we want yet
    if (null == selectedRecognizer)
    {
        // if supports LinedInput
        if ((oneReco.Capabilities & RecognizerCapabilities.LinedInput) != 0)
        {
            foreach (short langID in oneReco.Languages)
            {
                // if supports German (1031)
                if (langID == 1031)
                {
                    foreach (Guid propertyGuid in oneReco.SupportedProperties)
                    {
                        // if supports ConfidenceLevel
                        if (propertyGuid == RecognitionProperty.ConfidenceLevel)
                        {
                            // assign selected
                            selectedRecognizer = oneReco;
                        }
                    }
                }
            }
        }
    }
}

平台

Windows Vista

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Recognizer 类

Recognizer 成员

Microsoft.Ink 命名空间

Recognizer

RecognitionProperty