Provides an InkAnalyzer with an analysis hint for a region.
Assembly: IAWinFX (in IAWinFX.dll)
An provides a hint for the InkAnalyzer to which it is attached. The hint applies to the area specified by the Location property of the . It provides extra context to the ink analyzer which is used to improve recognition accuracy. The InkAnalyzer applies this context information when analyzing ink within the hint's area.
If a hint is assigned an infinite area, termed a global hint, then the InkAnalyzer applies the hint's context to all ink that is not within other hint areas. Multiple hints may be attached to a single InkAnalyzer. However, only one global hint can be attached to a single InkAnalyzer, and no non-global hints can overlap. For more information about the types of context information that a hint can provide, see the members page of the .
Adding a hint to an InkAnalyzer does not change the InkAnalyzer object's DirtyRegion. To have the InkAnalyzer reanalyze ink within the hint's area, use the DirtyRegion object's Union(AnalysisRegion) method.
The InkAnalyzer updates the hint's Links property if either the Analyze or the BackgroundAnalyze method is called. The InkAnalyzer adds a ContextLink between the and each ContextNode that the hint applies to. If a hint applies to all of the descendants of a ContextNode, the InkAnalyzer links the hint only to that ContextNode, and not to any of its descendants.
The Location property of an will not be used to apply the hint to a custom recognizer node. If you create a hint and set its location to include the strokes in the CustomRecognizerNode, that hint will not be applied to those strokes. To apply the hint correctly to the strokes inside a custom recognizer node, create a link between the and CustomRecognizerNode before calling Analyze. For example, assume that there is an called theAnalysisHint and a CustomRecognizerNode called theCustomRecognizerNode. To create a link between the two, use theAnalysisHint.Links.Add(theCustomRecognizerNode, ContextLinkDirection.LinksWith).
Only one non-global hint can be applied to a CustomRecognizerNode. To remove a non-global hint from a CustomRecognizerNode, use ContextLinkCollectionRemove to remove the link from the Links property of the CustomRecognizerNode.
No links from an to CustomRecognizerNode are created or deleted when analysis occurs.
If hints are used in a form application, avoid mixing text context with ink. Hints are meant to associate the ink to areas on pages; any text context will interfere with this ink to hint association. Thus, text field names should not be created in the analysis tree. If they are, the analysis operation may merge the ink and the text context in the same writing region, thereby preventing ink from being associated with the hint area.
This example creates an (named theAnalysisHint) for the InkAnalyzer (named theInkAnalyzerWithHint) and makes theAnalysisHint a global hint by making its area infinite. It then sets the AllowPartialDictionaryTerms and Name properties on the hint.
// Add a new, global analysis hint to theInkAnalyzerWithHint. AnalysisHintNode theAnalysisHint = this.theInkAnalyzerWithHint.CreateAnalysisHint(); theAnalysisHint.Location.MakeInfinite(); theAnalysisHint.AllowPartialDictionaryTerms = true; theAnalysisHint.Name = "Allow Partial Dictionary Terms";
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.