Recognizers.GetDefaultRecognizer Method
Recognizers.GetDefaultRecognizer Method |
Returns the default recognizer based on the user's locale setting.
Definition
Visual Basic .NET Public Function GetDefaultRecognizer() As Recognizer C# public Recognizer GetDefaultRecognizer(); Managed C++ public: Recognizer* GetDefaultRecognizer();
Return Value
Microsoft.Ink.Recognizer. Returns the requested recognizer.
Exceptions
Remarks
Each language can have a default recognizer. For example, a user can have a default recognizer for U.S. English and a default recognizer for French. If no locale is specified, this method returns the recognizer for the active input locale. To select the active input locale, in the Regional and Language Options in ControlPanel, on the Languages tab, click Details, and then select Default input language.
For more information about national language support (NLS), see NLS Terminology .
This method first checks if there is a matching recognizer for the user's input locale. If there is none, it checks if there is a matching recognizer for the current system locale.
This method uses the thread's language code identifier (LCID), which may be different than the user's locale setting. To query for a particular language, use the GetDefaultRecognizer(Int32) overload of this method.
Examples
[C#]
This C# example gets the default recognizer for the system and identifies it with the Recognizer object, recoDefault.
using Microsoft.Ink; // . . . Recognizers theRecognizers = new Recognizers(); // Get the default recognizer. Recognizer recoDefault = theRecognizers.GetDefaultRecognizer;
[Visual Basic .NET]
This Microsoft® Visual Basic® .NET example gets the default recognizer for the system and identifies it with the Recognizer object, recoDefault.
Imports Microsoft.Ink ' . . . Dim theRecognizers As Recognizers = New Recognizers() Dim recoDefault As Recognizer 'Get the default recognizer. recoDefault = theRecognizers.GetDefaultRecognizer()
See Also