Compartir a través de


InkAnalyzer.GetAlternates Method (Strokes)

Returns up to 10 analysis alternates for the specified strokes.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.dll)

Syntax

'Declaration
Public Function GetAlternates ( _
    strokes As Strokes _
) As AnalysisAlternateCollection
'Usage
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
Not applicable.

Parameters

  • strokes
    The strokes for which to get analysis alternates.

Return Value

Up to 10 of the top analysis alternates for strokes.

Remarks

The top alternate is returned as the first alternate of the collection. If there are more that 10 alternates, only the first 10 are returned.

The Stroke objects in strokes do not have to represent adjacent areas of the document.

Example

This example gets up to 10 of the top alternates for the Strokes, theStrokes, associated with the InkAnalyzer, theInkAnalyzer. It then adds the recognized strings for the alternates to the System.Collections.Specialized.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()
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);
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class
InkAnalyzer Members
Microsoft.Ink Namespace
Microsoft.Ink.AnalysisAlternate
Microsoft.Ink.AnalysisAlternateCollection
Microsoft.Ink.Stroke
Microsoft.Ink.Strokes