ContextNodeTypeBase.AnalysisHint 字段
表示节点的类型,该节点向 InkAnalyzerBase 提供区域的其他上下文信息,以改进分析结果。
命名空间: System.Windows.Ink.AnalysisCore
程序集: IACore(在 IACore.dll 中)
语法
声明
Public Shared ReadOnly AnalysisHint As Guid
用法
Dim value As Guid
value = ContextNodeTypeBase.AnalysisHint
public static readonly Guid AnalysisHint
public:
static initonly Guid AnalysisHint
public static final Guid AnalysisHint
public static final var AnalysisHint : Guid
备注
此 ContextNodeTypeBase 字段的 Guid 值是 b3e85327-34d8-4a53-9bed-c4aa612428d3。
示例
下面的示例在 InkAnalyzerBase (theInkAnalyzerBaseWithHint) 的节点树中查找类型为 WritingRegion 的所有 ContextNodeTypeBase 对象。然后,该示例将链接到智能标记值为“IS_DATE_FULLDATE”的提示节点的那些对象放置到名为 writingRegionsWithFactoids 的 ContextNodeBaseCollection 中。
Dim writingRegionsWithFactoids As _
New ContextNodeBaseCollection(Me.theInkAnalyzerWithHint)
Dim allWritingRegions As ContextNodeBaseCollection = _
Me.theInkAnalyzerWithHint.FindNodesOfType( _
ContextNodeTypeBase.WritingRegion)
Dim writingRegion As ContextNodeBase
For Each writingRegion In allWritingRegions
' See if they are linked to any factoid
Dim link As ContextLinkBase
For Each link In writingRegion.Links
If link.SourceNode.Type = ContextNodeType.AnalysisHint And _
link.SourceNode.ContainsPropertyData(PropertyGuidsForAnalysisHintsBase.Factoid) Then
If CType(link.SourceNode.GetPropertyData(PropertyGuidsForAnalysisHintsBase.Factoid), String) _
= "IS_DATE_FULLDATE" Then
writingRegionsWithFactoids.Add(writingRegion)
End If
End If
Next link
Next writingRegion
ContextNodeBaseCollection writingRegionsWithFactoids =
new ContextNodeBaseCollection(this.theInkAnalyzerBaseWithHint);
ContextNodeBaseCollection allWritingRegions =
this.theInkAnalyzerBaseWithHint.FindNodesOfType(
System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.WritingRegion);
foreach (ContextNodeBase writingRegion in allWritingRegions)
{
// See if they are linked to any factoid
foreach (ContextLinkBase link in writingRegion.Links)
{
if (link.SourceNode.Type == ContextNodeTypeBase.AnalysisHint &&
link.SourceNode.ContainsPropertyData(PropertyGuidsForAnalysisHintsBase.Factoid))
{
if ((string) link.SourceNode.GetPropertyData(PropertyGuidsForAnalysisHintsBase.Factoid)
== "IS_DATE_FULLDATE")
{
writingRegionsWithFactoids.Add(writingRegion);
}
}
}
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0