共用方式為


AnalysisHintNode.GetWordlist 方法

傳回字串陣列,這個陣列表示目前分析提示的單字清單。

命名空間:  System.Windows.Ink
組件:  IAWinFX (在 IAWinFX.dll 中)

語法

'宣告
Public Function GetWordlist As String()
'用途
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[]

傳回值

型別:array<System.String[]
字串陣列,表示目前分析提示的單字清單;如果未設定單字清單則為 nullNull 參照 (即 Visual Basic 中的 Nothing)。

備註

若要變更提示的單字清單,請使用 SetWordlist

範例

這個範例會建立 StringBuilder (notes),並加入有關目前附加至 InkAnalyzer (theInkAnalyzerWithHint) 之所有提示的資訊。每個提示的提示名稱、單字清單和已辨識的字串都會加入至 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();
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

AnalysisHintNode 類別

AnalysisHintNode 成員

System.Windows.Ink 命名空間