Freigeben über


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);
}
/** @property */
public boolean get_CoerceToFactoid ()

/** @property */
public void set_CoerceToFactoid (boolean value)
public function get CoerceToFactoid () : boolean

public function set CoerceToFactoid (value : boolean)
Not applicable.

Property Value

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.

Example

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

AnalysisHintNode Class
AnalysisHintNode Members
Microsoft.Ink Namespace