Share via


AnalysisHintNode.CoerceToFactoid Property

Gets or sets a value indicating whether the InkAnalyzer limits its analysis of ink within the hint's area to conform to the hint's Factoid property.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Property CoerceToFactoid As Boolean
'Usage
Dim instance As AnalysisHintNode 
Dim value As Boolean 

value = instance.CoerceToFactoid

instance.CoerceToFactoid = value
public bool CoerceToFactoid { get; set; }
public:
property bool CoerceToFactoid {
    bool get ();
    void set (bool value);
}
public function get CoerceToFactoid () : boolean 
public function set CoerceToFactoid (value : boolean)

Property Value

Type: System.Boolean
true if the InkAnalyzer restricts its analysis of ink within the hint's area to conform to the hint's Factoid property; otherwise, false. The default is false.

Remarks

If CoerceToFactoid is false and Factoid is set to non-empty string, the InkAnalyzer extends its analysis to also allow results that conform to the hint's factoid.

During analysis, if the ink recognizer applied to the strokes does not support factoid coercion, the ink analyzer generates an AnalysisWarning with its WarningCode property set to the Microsoft.Ink.AnalysisWarningCode value FactoidCoercionNotSupported.

Examples

This example creates an AnalysisHintNode, theAnalysisHint, for the InkAnalyzer, theInkAnalyzerWithHint, and makes theAnalysisHint a global hint. It then sets the CoerceToFactoid, Factoid, and Name properties on the hint.

' Add a new, global analysis hint to theInkAnalyzerWithHint. 
Dim theAnalysisHint As Microsoft.Ink.AnalysisHintNode = _
    Me.theInkAnalyzerWithHint.CreateAnalysisHint()
theAnalysisHint.Location.MakeInfinite()

theAnalysisHint.Factoid = "(!IS_DATE_FULLDATE)"
theAnalysisHint.CoerceToFactoid = True
theAnalysisHint.Name = "Coerce to Factoid"
// Add a new, global analysis hint to theInkAnalyzerWithHint.
Microsoft.Ink.AnalysisHintNode theAnalysisHint =
    this.theInkAnalyzerWithHint.CreateAnalysisHint();
theAnalysisHint.Location.MakeInfinite();

theAnalysisHint.Factoid = "(!IS_DATE_FULLDATE)";
theAnalysisHint.CoerceToFactoid = true;
theAnalysisHint.Name = "Coerce to Factoid";

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

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

AnalysisHintNode Class

AnalysisHintNode Members

Microsoft.Ink Namespace