Share via


InkAnalyzer.GetAlternates Method (StrokeCollection)

Returns a AnalysisAlternateCollection that contains up to 10 analysis alternates for the specified strokes.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public Function GetAlternates ( _
    strokes As StrokeCollection _
) As AnalysisAlternateCollection
'Usage
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 function GetAlternates(
    strokes : StrokeCollection
) : AnalysisAlternateCollection

Parameters

Return Value

Type: System.Windows.Ink.AnalysisAlternateCollection
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.

Examples

This example gets the top 10 alternates for the StrokeCollection named theStrokes that are associated with the InkAnalyzer named theInkAnalyzer. It then adds the recognized strings for alternates to the 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);
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class

InkAnalyzer Members

GetAlternates Overload

System.Windows.Ink Namespace

System.Windows.Ink.AnalysisAlternate

System.Windows.Ink.AnalysisAlternateCollection

System.Windows.Ink.Stroke

System.Windows.Ink.StrokeCollection