Sdílet prostřednictvím


AnalysisWarning.AnalysisHint Property

Returns the analysis hint that caused the warning during an ink analysis operation.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public ReadOnly Property AnalysisHint As AnalysisHintNode
'Usage
Dim instance As AnalysisWarning 
Dim value As AnalysisHintNode 

value = instance.AnalysisHint
public AnalysisHintNode AnalysisHint { get; }
public:
property AnalysisHintNode^ AnalysisHint {
    AnalysisHintNode^ get ();
}
public function get AnalysisHint () : AnalysisHintNode

Property Value

Type: System.Windows.Ink.AnalysisHintNode
The AnalysisHintNode object that is responsible for this warning.

Remarks

If no AnalysisHintNode is associated with this warning, nulla null reference (Nothing in Visual Basic) is returned.

The InkAnalyzer generates an AnalysisWarning with a non-null AnalysisHint property. For example, if you misspell a Factoid on a AnalysisHintNode, ink analysis returns an AnalysisStatus with one AnalysisWarning. The AnalysisHint property of that AnalysisWarning references the AnalysisHintNode with a misspelled factoid. The WarningCode property of the AnalysisWarning is set to FactoidNotSupported to indicate that there is a problem with the factoid.

Examples

The following example shows an AnalysisWarning named warning and checks if it is associated with any hints. If it is associated with a hint, the information about the hint is added to a message string named message.

If Not (warning.AnalysisHint Is Nothing) Then 
    Dim hint As AnalysisHintNode = warning.AnalysisHint
    message &= Environment.NewLine & "Hint information: "
    message &= "AllowPartialDictionaryTerms" 
    If hint.AllowPartialDictionaryTerms Then
        message &= " = true " 
    Else
        message &= " = false " 
    End If
    message &= "CoerceToFactoid" 
    If hint.CoerceToFactoid Then
        message &= " = true " 
    Else
        message &= " = false " 
    End If 
    If Not (hint.Factoid Is Nothing) Then
        message &= "Factoid = " & warning.AnalysisHint.Factoid & " " 
    End If
    message &= "Guide Drawn Box = (" _
            & hint.Guide.DrawnBoxTop.ToString() & ", " _
            & hint.Guide.DrawnBoxLeft.ToString() & ", " _
            & hint.Guide.DrawnBoxBottom.ToString() & ", " _
            & hint.Guide.DrawnBoxRight.ToString() & ", " & ")"
    message &= "Guide Writing Box = (" _
            & hint.Guide.WritingBoxTop.ToString() & ", " _
            & hint.Guide.WritingBoxLeft.ToString() & ", " _
            & hint.Guide.WritingBoxBottom.ToString() & ", " _
            & hint.Guide.WritingBoxRight.ToString() & ", " & ")" 
    If Not (hint.Name Is Nothing) Then
        message &= "Name = " & warning.AnalysisHint.Name & " " 
    End If 
    If Not (hint.PrefixText Is Nothing) Then
        message &= "PrefixText = " & warning.AnalysisHint.PrefixText & " " 
    End If 
    If Not (hint.SuffixText Is Nothing) Then
        message &= "SuffixText = " & warning.AnalysisHint.SuffixText & " " 
    End If
    message &= "WordMode" 
    If hint.WordMode Then
        message &= " = true" 
    Else
        message &= " = false" 
    End If 
End If
if (warning.AnalysisHint != null)
{
    AnalysisHintNode hint = warning.AnalysisHint;
    message += Environment.NewLine + "Hint information: ";
    message += "AllowPartialDictionaryTerms";
    if (hint.AllowPartialDictionaryTerms)
        message += " = true ";
    else
        message += " = false ";
    message += "CoerceToFactoid";
    if (hint.CoerceToFactoid)
        message += " = true ";
    else
        message += " = false ";
    if (hint.Factoid != null)
        message += "Factoid = " + warning.AnalysisHint.Factoid + " ";
    message += "Guide Drawn Box = (" +
        hint.Guide.DrawnBoxTop.ToString() + ", " +
        hint.Guide.DrawnBoxLeft.ToString() + ", " +
        hint.Guide.DrawnBoxBottom.ToString() + ", " +
        hint.Guide.DrawnBoxRight.ToString() + ", " + ")";
    message += "Guide Writing Box = (" +
        hint.Guide.WritingBoxTop.ToString() + ", " +
        hint.Guide.WritingBoxLeft.ToString() + ", " +
        hint.Guide.WritingBoxBottom.ToString() + ", " +
        hint.Guide.WritingBoxRight.ToString() + ", " + ")";
    if (hint.Name != null)
        message += "Name = " + warning.AnalysisHint.Name + " ";
    if (hint.PrefixText != null)
        message += "PrefixText = " + warning.AnalysisHint.PrefixText + " ";
    if (hint.SuffixText != null)
        message += "SuffixText = " + warning.AnalysisHint.SuffixText + " ";
    message += "WordMode";
    if (hint.WordMode)
        message += " = true";
    else
        message += " = false";
}

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

AnalysisWarning Class

AnalysisWarning Members

System.Windows.Ink Namespace