InkAnalyzerBase.CreateCustomRecognizer 方法
为分析器创建新的自定义识别器节点。
命名空间: System.Windows.Ink.AnalysisCore
程序集: IACore(在 IACore.dll 中)
语法
声明
Public Function CreateCustomRecognizer ( _
inkRecognizerId As Guid _
) As ContextNodeBase
用法
Dim instance As InkAnalyzerBase
Dim inkRecognizerId As Guid
Dim returnValue As ContextNodeBase
returnValue = instance.CreateCustomRecognizer(inkRecognizerId)
public ContextNodeBase CreateCustomRecognizer(
Guid inkRecognizerId
)
public:
ContextNodeBase^ CreateCustomRecognizer(
Guid inkRecognizerId
)
public ContextNodeBase CreateCustomRecognizer(
Guid inkRecognizerId
)
public function CreateCustomRecognizer(
inkRecognizerId : Guid
) : ContextNodeBase
参数
- inkRecognizerId
类型:System.Guid
要为其创建节点的 InkRecognizerBase 的全局唯一标识符 (GUID)。
返回值
类型:System.Windows.Ink.AnalysisCore.ContextNodeBase
备注
此方法创建 Type 属性值为 CustomRecognizer() 的新 ContextNodeBase。然后将该新自定义识别器节点添加到墨迹分析器的 RootNode 的 SubNodes 集合。
示例
下面的示例为 InkAnalyzerBase (theInkAnalyzerBase) 创建自定义识别器节点。仅当分析器的 GetInkRecognizersByPriority 方法返回包含日语墨迹识别器的 InkRecognizerBaseCollection 时,此示例才创建节点。
' Add a custom recognizer node for Japanese, which has a locale
' identifier of 0x0011.
Dim theInkRecognizer As System.Windows.Ink.AnalysisCore.InkRecognizerBase = _
theInkAnalyzerBase.GetInkRecognizersByPriority().GetPriorityInkRecognizer(&H11)
Dim theCustomRecognizerNode As System.Windows.Ink.AnalysisCore.ContextNodeBase = Nothing
If Nothing IsNot theInkRecognizer Then
theCustomRecognizerNode = _
theInkAnalyzerBase.CreateCustomRecognizer(theInkRecognizer.Guid)
End If
// Add a custom recognizer node for Japanese, which has a locale
// identifier of 0x0011.
System.Windows.Ink.AnalysisCore.InkRecognizerBase theInkRecognizer =
theInkAnalyzerBase.GetInkRecognizersByPriority().GetPriorityInkRecognizer(0x0011);
System.Windows.Ink.AnalysisCore.ContextNodeBase theCustomRecognizerNode = null;
if (null != theInkRecognizer)
{
theCustomRecognizerNode =
theInkAnalyzerBase.CreateCustomRecognizer(theInkRecognizer.Guid);
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0
另请参见
参考
System.Windows.Ink.AnalysisCore 命名空间
System.Windows.Ink.AnalysisCore.ContextNodeBase