Sdílet prostřednictvím


RecognitionProperty Class

Defines globally unique identifiers (GUIDs) for properties that a InkRecognizerBase might support for recognition results.

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public NotInheritable Class RecognitionProperty
'Usage
Dim instance As RecognitionProperty
public sealed class RecognitionProperty
public ref class RecognitionProperty sealed
public final class RecognitionProperty

Remarks

These GUIDs are available as read-only fields of this object. Use the InkRecognizerBase.GetSupportedProperties method to determine which properties are supported by a InkRecognizerBase.

Use these GUIDs to access properties of a RecognitionAlternate object by calling the GetPropertyValue method.

Examples

The following example demonstrates the RecognitionProperty class.

' 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;
    }
}

Inheritance Hierarchy

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

RecognitionProperty Members

System.Windows.Ink.AnalysisCore Namespace

InkRecognizerBase.GetSupportedProperties

System.Windows.Ink.AnalysisCore.InkRecognizerCapabilities