다음을 통해 공유


InkAnalyzer.GetAlternates Method (StrokeCollection, Int32)

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

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

Syntax

'Declaration
Public Function GetAlternates ( _
    strokes As StrokeCollection, _
    maximumAlternates As Integer _
) As AnalysisAlternateCollection
'Usage
Dim instance As InkAnalyzer
Dim strokes As StrokeCollection
Dim maximumAlternates As Integer
Dim returnValue As AnalysisAlternateCollection

returnValue = instance.GetAlternates(strokes, maximumAlternates)
public AnalysisAlternateCollection GetAlternates (
    StrokeCollection strokes,
    int maximumAlternates
)
public:
AnalysisAlternateCollection^ GetAlternates (
    StrokeCollection^ strokes, 
    int maximumAlternates
)
public AnalysisAlternateCollection GetAlternates (
    StrokeCollection strokes, 
    int maximumAlternates
)
public function GetAlternates (
    strokes : StrokeCollection, 
    maximumAlternates : int
) : AnalysisAlternateCollection
Not applicable.

Parameters

  • strokes
  • maximumAlternates
    The number of analysis alternates to return.

Return Value

Up to maximumAlternates of the top analysis alternates for strokes.

Remarks

The top alternate is returned as the first alternate of the collection.

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

Example

This example gets the top five alternates for the StrokeCollection, theStrokes, associated with the InkAnalyzer, theInkAnalyzer It then adds the recognized strings for the alternates to the StringCollection, theAlternateStrings.

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

For Each theAlternate As AnalysisAlternate In theAlternateCollection
    theAlternateStrings.Add(theAlternate.RecognizedString)
Next theAlternate
// Get 5 analysis alternates for the strokes collection and add the
// recognized string to a collection.
theAlternateCollection = this.theInkAnalyzer.GetAlternates(theStrokes, 5);
theAlternateStrings.Clear();
foreach (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
System.Windows.Ink Namespace
System.Windows.Ink.AnalysisAlternate
System.Windows.Ink.AnalysisAlternateCollection
System.Windows.Ink.Stroke
System.Windows.Ink.StrokeCollection