InkAnalyzerBase.CreateAnalysisHint Method
Adds a new analysis hint with an empty area to the ink analyzer.
Namespace: System.Windows.Ink.AnalysisCore
Assembly: IACore (in IACore.dll)
Syntax
'Declaration
Public Function CreateAnalysisHint As ContextNodeBase
'Usage
Dim instance As InkAnalyzerBase
Dim returnValue As ContextNodeBase
returnValue = instance.CreateAnalysisHint()
public ContextNodeBase CreateAnalysisHint()
public:
ContextNodeBase^ CreateAnalysisHint()
public function CreateAnalysisHint() : ContextNodeBase
Return Value
Type: System.Windows.Ink.AnalysisCore.ContextNodeBase
The new analysis hint.
Remarks
To provide extra context information for the ink analyzer, you can add analysis hints to the ink analyzer. Analysis hints can improve recognition accuracy. For example, you can add factoid and guide information for fields in a form application.
This method creates a new ContextNodeBase with a Type property value of AnalysisHint and adds the new hint to the SubNodes collection of the ink analyzer's RootNode.
To add context information to the hint, use the ContextNodeBase object's AddPropertyData method with the propertyDataId parameter set to one of the globally unique identifiers (GUIDs) in the PropertyGuidsForAnalysisHintsBase class.
If a hint is assigned an infinite area, termed a global hint, the ink analyzer applies the hint's context to all ink that is not within another hint's area. Multiple hints may be attached to a single analyzer. However, only one global hint can be attached to a single ink analyzer, and no non-global hints can overlap. For more information about the types of context information that a hint can provide, see PropertyGuidsForAnalysisHintsBase.
Adding an analysis hint does not mark the hint's area for reanalysis. To mark the area within the hint for reanalysis, call the DirtyRegion object's Union method with the hint's Location.
For more information about ink analysis, see Ink Analysis Overview.
Examples
The following example creates an analysis hint, theAnalysisHint, for the InkAnalyzerBase, theInkAnalyzerBase. It then makes theAnalysisHint a global hint and adds the AllowPartialDictionaryTerms and Name properties to the hint.
' Add a new, global analysis hint to the ink analyzer.
Dim theAnalysisHintNode As System.Windows.Ink.AnalysisCore.ContextNodeBase = _
theInkAnalyzerBase.CreateAnalysisHint()
theAnalysisHintNode.Location.MakeInfinite()
theAnalysisHintNode.AddPropertyData( _
System.Windows.Ink.AnalysisCore.PropertyGuidsForAnalysisHintsBase.AllowPartialDictionaryTerms, _
True)
theAnalysisHintNode.AddPropertyData( _
System.Windows.Ink.AnalysisCore.PropertyGuidsForAnalysisHintsBase.Name, _
"Allow Partial Dictionary Terms")
// Add a new, global analysis hint to the ink analyzer.
System.Windows.Ink.AnalysisCore.ContextNodeBase theAnalysisHintNode =
theInkAnalyzerBase.CreateAnalysisHint();
theAnalysisHintNode.Location.MakeInfinite();
theAnalysisHintNode.AddPropertyData(
System.Windows.Ink.AnalysisCore.PropertyGuidsForAnalysisHintsBase.AllowPartialDictionaryTerms,
true);
theAnalysisHintNode.AddPropertyData(
System.Windows.Ink.AnalysisCore.PropertyGuidsForAnalysisHintsBase.Name,
"Allow Partial Dictionary Terms");
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
System.Windows.Ink.AnalysisCore Namespace
InkAnalyzerBase.DeleteAnalysisHint
InkAnalyzerBase.GetAnalysisHints
ContextNodeBase.AddPropertyData
PropertyGuidsForAnalysisHints