Freigeben über


AnalysisHintNode.GetWordlist Method

Returns a string array that represents the word list for the current analysis hint.

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

Syntax

'Declaration
Public Function GetWordlist As String()
'Usage
Dim instance As AnalysisHintNode
Dim returnValue As String()

returnValue = instance.GetWordlist
public string[] GetWordlist ()
public:
array<String^>^ GetWordlist ()
public String[] GetWordlist ()
public function GetWordlist () : String[]
Not applicable.

Return Value

A string array that represents the word list for the current analysis hint, or a null reference (Nothing in Visual Basic) if no word list is set.

Remarks

To change the hint's word list, use SetWordlist.

Example

This example creates a StringBuilder, notes, and adds information about all the hints currently attached to the InkAnalyzer, theInkAnalyzerWithHint. For each hint, the hint's name, word list, and recognized string are added to notes.

Dim notes As New System.Text.StringBuilder()
notes.AppendLine("List of all the current AnalysisHintNodes:")

Dim theHint As AnalysisHintNode
For Each theHint In  Me.theInkAnalyzerWithHint.GetAnalysisHints()
    notes.AppendLine(" Hint Name: " + theHint.Name)
    
    If 0 < theHint.GetWordlist().Length Then
        notes.Append(" - WordList: ")
        Dim first As Boolean = True
        Dim theWord As String
        For Each theWord In  theHint.GetWordlist()
            If Not first Then
                notes.Append(", ")
            Else
                first = False
            End If
            notes.AppendFormat("'{0}'", theWord)
        Next theWord
        notes.AppendLine()
    Else
        notes.AppendLine(" - No WordList specified")
    End If
    
    If String.Empty <> theHint.GetRecognizedString() Then
        notes.AppendLine(" - Recognized string: " + theHint.GetRecognizedString())
    Else
        notes.AppendLine(" - No recognized string.")
    End If
    
    notes.AppendLine()
Next theHint
System.Text.StringBuilder notes = new System.Text.StringBuilder();
notes.AppendLine("List of all the current AnalysisHintNodes:");

foreach (AnalysisHintNode theHint
    in this.theInkAnalyzerWithHint.GetAnalysisHints())
{
    notes.AppendLine(" Hint Name: " + theHint.Name);

    if (0 < theHint.GetWordlist().Length)
    {
        notes.Append(" - WordList: ");
        bool first = true;
        foreach (String theWord in theHint.GetWordlist())
        {
            if (!first)
            {
                notes.Append(", ");
            }
            else
            {
                first = false;
            }
            notes.AppendFormat("'{0}'", theWord);
        }
        notes.AppendLine();
    }
    else
    {
        notes.AppendLine(" - No WordList specified");
    }

    if (string.Empty != theHint.GetRecognizedString())
    {
        notes.AppendLine(" - Recognized string: "
            + theHint.GetRecognizedString());
    }
    else
    {
        notes.AppendLine(" - No recognized string.");
    }

    notes.AppendLine();
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

AnalysisHintNode Class
AnalysisHintNode Members
System.Windows.Ink Namespace