HandwrittenTextInsertion.InsertInkRecognitionResult 方法
插入识别结果。
命名空间: Microsoft.Ink.TextInput
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Sub InsertInkRecognitionResult ( _
recognitionResult As RecognitionResult, _
culture As CultureInfo, _
alternateContainsAutoSpacingInformation As Boolean _
)
用法
Dim instance As HandwrittenTextInsertion
Dim recognitionResult As RecognitionResult
Dim culture As CultureInfo
Dim alternateContainsAutoSpacingInformation As Boolean
instance.InsertInkRecognitionResult(recognitionResult, _
culture, alternateContainsAutoSpacingInformation)
public void InsertInkRecognitionResult(
RecognitionResult recognitionResult,
CultureInfo culture,
bool alternateContainsAutoSpacingInformation
)
public:
void InsertInkRecognitionResult(
RecognitionResult^ recognitionResult,
CultureInfo^ culture,
bool alternateContainsAutoSpacingInformation
)
public void InsertInkRecognitionResult(
RecognitionResult recognitionResult,
CultureInfo culture,
boolean alternateContainsAutoSpacingInformation
)
public function InsertInkRecognitionResult(
recognitionResult : RecognitionResult,
culture : CultureInfo,
alternateContainsAutoSpacingInformation : boolean
)
参数
- recognitionResult
类型:Microsoft.Ink.RecognitionResult
用于插入的 RecognitionResult,其中包含识别结果以及用于插入的墨迹笔画的集合。
- culture
类型:System.Globalization.CultureInfo
- alternateContainsAutoSpacingInformation
类型:System.Boolean
指定生成识别文本时是否启用了自动间距调整。如果启用了自动间距调整,则为 true;否则为 false。
示例
下面的示例演示 InsertInkRecognitionResult 的用法。myHandwrittenTextInsertion 对象是 HandwrittenTextInsertion 的实例。文本插入到应用程序中当前具有焦点的编辑字段。
myHandwrittenTextInsertion = New Microsoft.Ink.TextInput.HandwrittenTextInsertion()
Dim recoResult As RecognitionResult = myInkCollector.Ink.Strokes.RecognitionResult
Dim context As New RecognizerContext()
context.RecognitionFlags = RecognitionModes.AutoSpace
context.Strokes = myInkCollector.Ink.Strokes
Dim recoStatus As RecognitionStatus
recoResult = context.Recognize(recoStatus)
myHandwrittenTextInsertion.InsertInkRecognitionResult(recoResult, System.Globalization.CultureInfo.CurrentCulture, True)
myHandwrittenTextInsertion = new Microsoft.Ink.TextInput.HandwrittenTextInsertion();
RecognitionResult recoResult = myInkCollector.Ink.Strokes.RecognitionResult;
RecognizerContext context = new RecognizerContext();
context.RecognitionFlags = RecognitionModes.AutoSpace;
context.Strokes = myInkCollector.Ink.Strokes;
RecognitionStatus recoStatus;
recoResult = context.Recognize(out recoStatus);
myHandwrittenTextInsertion.InsertInkRecognitionResult(recoResult, System.Globalization.CultureInfo.CurrentCulture, true);
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0