다음을 통해 공유


InkAnalyzer.GetAlternates Method (ContextNodeCollection)

Returns a AnalysisAlternateCollection that contains up to 10 analysis alternates for the nodes in a specified ContextNodeCollection.

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

Syntax

'Declaration
Public Function GetAlternates ( _
    nodes As ContextNodeCollection _
) As AnalysisAlternateCollection
'Usage
Dim instance As InkAnalyzer
Dim nodes As ContextNodeCollection
Dim returnValue As AnalysisAlternateCollection

returnValue = instance.GetAlternates(nodes)
public AnalysisAlternateCollection GetAlternates (
    ContextNodeCollection nodes
)
public:
AnalysisAlternateCollection^ GetAlternates (
    ContextNodeCollection^ nodes
)
public AnalysisAlternateCollection GetAlternates (
    ContextNodeCollection nodes
)
public function GetAlternates (
    nodes : ContextNodeCollection
) : AnalysisAlternateCollection
Not applicable.

Parameters

  • nodes

Return Value

Up to 10 of the top analysis alternates for nodes.

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 ContextNode objects in nodes do not have to represent adjacent areas of the document.

For each analysis hint in nodes, the InkAnalyzer returns only the top alternate.

Example

This example gets the top 10 alternates for the ContextNodeCollection, theContextNodes, associated with the InkAnalyzer, theInkAnalyzer. It then adds the recognized strings for the alternates to the StringCollection, theAlternateStrings.

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

For Each theAlternate As AnalysisAlternate In theAlternateCollection
    theAlternateStrings.Add(theAlternate.RecognizedString)
Next theAlternate
// Get analysis alternates for the context node collection and add the
// recognized strings to a string collection.
theAlternateCollection = this.theInkAnalyzer.GetAlternates(theContextNodes);
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.ContextNode
System.Windows.Ink.ContextNodeCollection