Share via


InkRecognizerBase.SetAsHighestPriorityInkRecognizer Method

Sets this InkRecognizerBase to the highest priority in the InkAnalyzerBase internal ordered list of recognizers.

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public Sub SetAsHighestPriorityInkRecognizer
'Usage
Dim instance As InkRecognizerBase

instance.SetAsHighestPriorityInkRecognizer()
public void SetAsHighestPriorityInkRecognizer()
public:
void SetAsHighestPriorityInkRecognizer()
public function SetAsHighestPriorityInkRecognizer()

Remarks

Each recognizer contains values that describe its supported languages and supported capabilities. By organizing the available recognizers into an ordered list, the InkAnalyzerBase can determine which recognizer to use if two or more recognizers support both the same language and capabilities. The InkAnalyzerBase will store an internal ordered list of recognizers. The internal ordered list will be populated dynamically each time it is called.

Note

If performance is slow due to accessing the registry, we may restrict this to only check the registry values when the InkAnalyzerBase is created.

The internal list will be ordered based on the following logic:

  1. Check to see if the Control Panel application has set an order by looking at the “Recognizers Precedence” registry key values:

    1. “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TPG\Recognizers Precedence”

    2. Each recognizer is listed as a registry sub-key by GUID.

    3. Each registry sub-key has one dword value called “Order”, which is a zero based order (0=first recognizer to use, 1= second recognizer to use… n = last recognizer to use).

    4. If the “Recognizers Precedence” key does not exists, or is corrupted, simply skip to the next step.

  2. Check to see if all installed Microsoft recognizers are represented in the ordered list by checking the “System Recognizer” registry keys. Any Microsoft recognizer that is found on the system but not included in the ordered list will be added to the end of the list, in the order found.

  3. Check to see if all installed external (3rd party) recognizers are represented in the ordered list by checking the “Recognizer” registry keys. Any external recognizer that is found on the system but not included in the ordered list will be added to the end of the list, in the order found.

Once the default ordering is built, applications may change or override the default ordering by calling this method and promoting a recognzier to the top of the list.

Use of the recognizers will be evaluated based on their order in the list:

  • The parser will start with the first recognizer in the list.

  • The first recognizer will be tested to see if it supports the language and capabilities of the ink being recognized.

  • If supported, the recognizer is used.

  • If not supported the next recognizer in the list is checked. Iteration through the list continues until a recognizer is found or the list is exhausted.

  • If no recognizer is found, the TPG_No_Suitable_Recognizer_Found exception is returned.

Platforms

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.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerBase Class

InkRecognizerBase Members

System.Windows.Ink.AnalysisCore Namespace