Share via


InkEdit.Recognizer Property

Gets or sets the Recognizer object used by the InkEdit control.

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property Recognizer As Recognizer
'Usage
Dim instance As InkEdit 
Dim value As Recognizer 

value = instance.Recognizer

instance.Recognizer = value
[BrowsableAttribute(false)]
public Recognizer Recognizer { get; set; }
[BrowsableAttribute(false)]
public:
property Recognizer^ Recognizer {
    Recognizer^ get ();
    void set (Recognizer^ value);
}
public function get Recognizer () : Recognizer 
public function set Recognizer (value : Recognizer)

Property Value

Type: Microsoft.Ink.Recognizer
The recognizer used by the InkEdit control.

Remarks

The default recognizer that is returned is the default recognizer for the active input locale. To select the active input locale, in the Regional and Language Options in Control Panel, on the Languages tab, users click Details, and then select the Default input language.

This property is only available at run time.

This property should be changed only if the Status property returns the InkEditStatus enumeration value, Idle.

If a factoid is used for the InkEdit control, it must be reapplied after setting the Recognizer property.

Examples

In this example, if an Recognizer object capable of recognizing Spanish is available, then the Recognizer property of the InkEdit control is set to use it.

If InkEditStatus.Idle = mInkEdit.Status Then 
    Const LCID_Spanish As Integer = &HC0A
    ' get all the Recognizers 
    Dim allR As Recognizers = New Recognizers()

    ' check each Recognizer 
    For Each R As Recognizer In allR
        ' check each supported language of the Recognizer 
        For Each LCID As Integer In R.Languages
            ' if the language == Spanish, change the Recognizer 
            If LCID_Spanish = LCID Then
                mInkEdit.Recognizer = R
            End If 
        Next 
    Next 

    ' display the name of the recognizer in the InkEdit control
    mInkEdit.Text = mInkEdit.Recognizer.Name + Environment.NewLine
End If
if (InkEditStatus.Idle == mInkEdit.Status)
{
    const int LCID_Spanish = 0x0C0A;
    // get all the Recognizers
    Recognizers allR = new Recognizers();

    // check each Recognizer 
    foreach (Recognizer R in allR)
    {
        // check each supported language of the Recognizer 
        foreach (int LCID in R.Languages)
        {
            // if the language == Spanish, change the Recognizer 
            if (LCID_Spanish == LCID)
            {
                mInkEdit.Recognizer = R;
            }
        }
    }

    // display the name of the recognizer in the InkEdit control
    mInkEdit.Text = mInkEdit.Recognizer.Name + Environment.NewLine;
}

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

InkEdit Class

InkEdit Members

Microsoft.Ink Namespace

Recognizer