針對所指定 ContextNodeCollection 中的節點最多傳回 10 個分析替代項目。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public Function GetAlternates ( _
nodes As ContextNodeCollection _
) As AnalysisAlternateCollection
'用途
Dim instance As InkAnalyzer
Dim nodes As ContextNodeCollection
Dim returnValue As AnalysisAlternateCollection
returnValue = instance.GetAlternates(nodes)
public AnalysisAlternateCollection GetAlternates(
ContextNodeCollection nodes
)
public:
AnalysisAlternateCollection^ GetAlternates(
ContextNodeCollection^ nodes
)
public AnalysisAlternateCollection GetAlternates(
ContextNodeCollection nodes
)
public function GetAlternates(
nodes : ContextNodeCollection
) : AnalysisAlternateCollection
參數
- nodes
型別:Microsoft.Ink.ContextNodeCollection
要取得分析替代項目的節點。
傳回值
型別:Microsoft.Ink.AnalysisAlternateCollection
nodes 最多有 10 個頂端分析替代項目。
備註
頂端替代項目會傳回做為集合的第一個替代項目。如果有超過 10 個替代項目,只會傳回前 10 個替代項目。
nodes 中的 ContextNode 物件不必表示文件的相鄰區域。
針對 nodes 中的每個分析提示,InkAnalyzer 只會傳回頂端替代項目。
範例
這個範例針對與 InkAnalyzer (theInkAnalyzer) 相關聯的 ContextNodeCollection (theContextNodes) 最多會取得 10 個頂端替代項目。接著會將替代項目的已辨識字串加入至名為 theAlternateStrings 的 System.Collections.Specialized.StringCollection。
' Get analysis alternates for the context node collection and add the
' recognized strings to a string collection.
theAlternateCollection = Me.theInkAnalyzer.GetAlternates(theContextNodes)
theAlternateStrings.Clear()
Dim theAlternate As Microsoft.Ink.AnalysisAlternate
For Each theAlternate In theAlternateCollection
theAlternateStrings.Add(theAlternate.RecognizedString)
Next theAlternate
// Get analysis alternates for the context node collection and add the
// recognized strings to a string collection.
theAlternateCollection = this.theInkAnalyzer.GetAlternates(theContextNodes);
theAlternateStrings.Clear();
foreach (Microsoft.Ink.AnalysisAlternate theAlternate
in theAlternateCollection)
{
theAlternateStrings.Add(theAlternate.RecognizedString);
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
Microsoft.Ink.AnalysisAlternate