RecognitionProperty 类

定义 InkRecognizerBase 可对识别结果支持的属性的全局唯一标识符 (GUID)。

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

语法

声明
Public NotInheritable Class RecognitionProperty
用法
Dim instance As RecognitionProperty
public sealed class RecognitionProperty
public ref class RecognitionProperty sealed
public final class RecognitionProperty
public final class RecognitionProperty

备注

这些 GUID 作为此对象的只读字段提供。使用 InkRecognizerBase.GetSupportedProperties 方法可确定 InkRecognizerBase 支持哪些属性。

通过调用 GetPropertyValue 方法,可以使用这些 GUID 访问 RecognitionAlternate 对象的属性。

示例

下面的示例演示 RecognitionProperty 类。

' Flags to hold capabilities
Dim hasConfidenceLevel As Boolean = False
Dim hasHotPoint As Boolean = False
Dim hasLineMetrics As Boolean = False
Dim hasLineNumber As Boolean = False
Dim hasMaximumStrokeCount As Boolean = False
Dim hasPointsPerInch As Boolean = False
Dim hasSegmentation As Boolean = False

Dim myInkRecognizerCapabilityGuids() As Guid = myInkRecognizer.GetSupportedProperties()

Dim myTempGuid As Guid = Nothing

Dim i As Integer = 0

While i < myInkRecognizerCapabilityGuids.Length
    myTempGuid = myInkRecognizerCapabilityGuids(i)

    If myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.ConfidenceLevel Then
        hasConfidenceLevel = True
    ElseIf myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.HotPoint Then
        hasHotPoint = True
    ElseIf myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.LineMetrics Then
        hasLineMetrics = True
    ElseIf myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.LineNumber Then
        hasLineNumber = True
    ElseIf myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.MaximumStrokeCount Then
        hasMaximumStrokeCount = True
    ElseIf myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.PointsPerInch Then
        hasPointsPerInch = True
    ElseIf myTempGuid = System.Windows.Ink.AnalysisCore.RecognitionProperty.Segmentation Then
        hasSegmentation = True
    End If

    i = i + 1
End While
// Flags to hold capabilities
bool
    hasConfidenceLevel = false,
    hasHotPoint = false,
    hasLineMetrics = false,
    hasLineNumber = false,
    hasMaximumStrokeCount = false,
    hasPointsPerInch = false,
    hasSegmentation = false;

Guid[] myInkRecognizerCapabilityGuids = myInkRecognizer.GetSupportedProperties();

Guid myTempGuid;

for (int i = 0; i < myInkRecognizerCapabilityGuids.Length; i++)
{
    myTempGuid = myInkRecognizerCapabilityGuids[i];

    if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.ConfidenceLevel)
    {
        hasConfidenceLevel = true;
    }
    else if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.HotPoint)
    {
        hasHotPoint = true;
    }
    else if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.LineMetrics)
    {
        hasLineMetrics = true;
    }
    else if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.LineNumber)
    {
        hasLineNumber = true;
    }
    else if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.MaximumStrokeCount)
    {
        hasMaximumStrokeCount = true;
    }
    else if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.PointsPerInch)
    {
        hasPointsPerInch = true;
    }
    else if (myTempGuid == System.Windows.Ink.AnalysisCore.RecognitionProperty.Segmentation)
    {
        hasSegmentation = true;
    }
}

继承层次结构

System.Object
  System.Windows.Ink.AnalysisCore.RecognitionProperty

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

平台

Windows Vista, Windows XP SP2, Windows Server 2003

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

RecognitionProperty 成员

System.Windows.Ink.AnalysisCore 命名空间

InkRecognizerBase.GetSupportedProperties

System.Windows.Ink.AnalysisCore.InkRecognizerCapabilities