次の方法で共有


InkAnalyzer.GetAlternates メソッド (StrokeCollection)

指定したストロークの分析代替候補を最大で 10 個含む AnalysisAlternateCollection を返します。

名前空間 :  System.Windows.Ink
アセンブリ :  IAWinFX (IAWinFX.dll 内)

構文

'宣言
Public Function GetAlternates ( _
    strokes As StrokeCollection _
) As AnalysisAlternateCollection
'使用
Dim instance As InkAnalyzer
Dim strokes As StrokeCollection
Dim returnValue As AnalysisAlternateCollection

returnValue = instance.GetAlternates(strokes)
public AnalysisAlternateCollection GetAlternates(
    StrokeCollection strokes
)
public:
AnalysisAlternateCollection^ GetAlternates(
    StrokeCollection^ strokes
)
public AnalysisAlternateCollection GetAlternates(
    StrokeCollection strokes
)
public function GetAlternates(
    strokes : StrokeCollection
) : AnalysisAlternateCollection

パラメータ

戻り値

型 : System.Windows.Ink.AnalysisAlternateCollection
strokes の最大 10 個の上位代替候補。

解説

最上位の代替候補が、コレクションの最初の代替候補として返されます。10 個を超える代替候補がある場合、最初の 10 個だけが返されます。

strokes 内の Stroke オブジェクトは、ドキュメントの隣接する領域を表している必要はありません。

この例では、theInkAnalyzer という名前の InkAnalyzer に関連付けられた theStrokes という名前の StrokeCollection の上位 10 個の代替候補を取得します。次に、代替候補の認識された文字列を、StringCollection (theAlternateStrings) に追加します。

' Get analysis alternates for the strokes collection and add the
' recognized strings to a string collection.
theAlternateCollection = Me.theInkAnalyzer.GetAlternates(theStrokes)
theAlternateStrings.Clear()

For Each theAlternate As AnalysisAlternate 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 (AnalysisAlternate theAlternate
    in theAlternateCollection)
{
    theAlternateStrings.Add(theAlternate.RecognizedString);
}

プラットフォーム

Windows Vista

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

InkAnalyzer クラス

InkAnalyzer メンバ

GetAlternates オーバーロード

System.Windows.Ink 名前空間

System.Windows.Ink.AnalysisAlternate

System.Windows.Ink.AnalysisAlternateCollection

System.Windows.Ink.Stroke

System.Windows.Ink.StrokeCollection