共用方式為


AnalysisAlternate.RecognizedString 屬性

取得 AnalysisAlternate 物件的辨識字串值。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)

語法

'宣告
Public ReadOnly Property RecognizedString As String
'用途
Dim instance As AnalysisAlternate
Dim value As String

value = instance.RecognizedString
public string RecognizedString { get; }
public:
property String^ RecognizedString {
    String^ get ();
}
/** @property */
public String get_RecognizedString()
public function get RecognizedString () : String

屬性值

型別:System.String
AnalysisAlternate 物件的辨識字串值。

範例

下列範例會在 InkAnalyzer (變數名稱為 theInkAnalyzer) 上呼叫 GetAlternates,然後對 AnalysisAlternateCollection 執行迴圈,再將 InkRecognitionConfidence 值不是 Poor 的所有替代項目都填入 ListBox (變數名稱為 alternatesListBox)。

alternatesListBox.Items.Clear()
' ContextNodeCollection selectedSubNodes is obtained via
' DirectCast(theInkAnalyzer.RootNode, RootNode).GetNodesFromTextRange(selStart, selLength);
Me.currentAlternates = theInkAnalyzer.GetAlternates(selectedSubNodes)
Dim alternate As AnalysisAlternate
For Each alternate In Me.currentAlternates
    ' Add only those that are not Poor confidence
    If alternate.InkRecognitionConfidence <> _
       Microsoft.Ink.InkRecognitionConfidence.Poor Then
        alternatesListBox.Items.Add(alternate.RecognizedString)
    End If
Next alternate
            alternatesListBox.Items.Clear();
            // ContextNodeCollection selectedSubNodes is obtained via
            // ((RootNode)theInkAnalyzer.RootNode).GetNodesFromTextRange(ref selStart, ref selLength);
            this.currentAlternates = theInkAnalyzer.GetAlternates(selectedSubNodes);
            foreach (AnalysisAlternate alternate in this.currentAlternates)
            {
                // Add only those that are not Poor confidence
                if (alternate.InkRecognitionConfidence !=
                    Microsoft.Ink.InkRecognitionConfidence.Poor)
                {
                    alternatesListBox.Items.Add(alternate.RecognizedString);
                }
            }

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

AnalysisAlternate 類別

AnalysisAlternate 成員

Microsoft.Ink 命名空間