針對指定的筆劃最多傳回 10 個分析替代項目。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public Function GetAlternates ( _
strokes As Strokes _
) As AnalysisAlternateCollection
'用途
Dim instance As InkAnalyzer
Dim strokes As Strokes
Dim returnValue As AnalysisAlternateCollection
returnValue = instance.GetAlternates(strokes)
public AnalysisAlternateCollection GetAlternates(
Strokes strokes
)
public:
AnalysisAlternateCollection^ GetAlternates(
Strokes^ strokes
)
public AnalysisAlternateCollection GetAlternates(
Strokes strokes
)
public function GetAlternates(
strokes : Strokes
) : AnalysisAlternateCollection
參數
- strokes
型別:Microsoft.Ink.Strokes
要取得分析替代項目的筆劃。
傳回值
型別:Microsoft.Ink.AnalysisAlternateCollection
strokes 最多有 10 個頂端分析替代項目。
備註
頂端替代項目會傳回做為集合的第一個替代項目。如果有超過 10 個替代項目,只會傳回前 10 個替代項目。
strokes 中的 Stroke 物件不必表示文件的相鄰區域。
範例
這個範例針對與 InkAnalyzer (theInkAnalyzer) 相關聯的 Strokes (theStrokes) 最多會取得 10 個頂端替代項目。接著會將替代項目的已辨識字串加入至名為 theAlternateStrings 的 System.Collections.Specialized.StringCollection。
' Get analysis alternates for the strokes collection and add the
' recognized strings to a string collection.
theAlternateCollection = Me.theInkAnalyzer.GetAlternates(theStrokes)
theAlternateStrings.Clear()
Dim theAlternate As Microsoft.Ink.AnalysisAlternate
For Each theAlternate In theAlternateCollection
theAlternateStrings.Add(theAlternate.RecognizedString)
Next theAlternate
// Get analysis alternates for the strokes collection and add the
// recognized strings to a string collection.
theAlternateCollection = this.theInkAnalyzer.GetAlternates(theStrokes);
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