InkAnalyzer.GetAlternates 方法 (StrokeCollection, Int32)

返回一个 AnalysisAlternateCollection,其中包含指定笔画的分析备选项(最多为指定的数目)。

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public Function GetAlternates ( _
    strokes As StrokeCollection, _
    maximumAlternates As Integer _
) As AnalysisAlternateCollection
用法
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

参数

  • maximumAlternates
    类型:System.Int32
    要返回的分析备选项的数目。

返回值

类型:System.Windows.Ink.AnalysisAlternateCollection
strokes 的最多前 maximumAlternates 个分析备选项。

备注

最佳备选项作为集合的第一个备选项返回。

存储在 strokes 中的 Stroke 对象不一定表示文档的相邻区域。

示例

此示例获取与 InkAnalyzer(名为 theInkAnalyzer)关联的 StrokeCollection(名为 theStrokes)的前 5 个备选项。然后将这些备选项的已识别字符串添加到 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);
}

平台

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