Share via


InkRecognizer.SetAsHighestPriorityInkRecognizer Method

Sets this InkRecognizer to the highest priority in the InkAnalyzer object's list of recognizers.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

Syntax

'Declaration
Public Sub SetAsHighestPriorityInkRecognizer
'Usage
Dim instance As InkRecognizer

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

Remarks

The SetAsHighestPriorityInkRecognizer method sets the current InkRecognizer as the highest priority. Call SetAsHighestPriorityInkRecognizer to ensure that the InkAnalyzer uses this InkRecognizer when two or more recognizers support the same language and capabilities.

Note

Setting this InkRecognizer as the highest priority does not mean that the InkAnalyzer will use this InkRecognizer to analyze ink. The InkAnalyzer uses the highest-priority InkRecognizer that supports the default locale unless you specify the locale id when you add strokes to the InkAnalyzer.

Example

The following example gets the InkRecognizer that supports Japanese and boxed input and sets it as the highest priority InkRecognizer. The code then calls GetPriorityInkRecognizer to get the highest-priority InkRecognizer for the default locale. The two InkRecognizer objects will be equal only if the default locale is set to Japanese.

Dim theInkRecognizers As InkRecognizerCollection = _
    theInkAnalyzer.GetInkRecognizersByPriority()

' Get the first recognizer from the InkRecognizerCollection that supports
' both region neutral Japanese and boxed input. 
Dim firstJapaneseBoxedInputRecognizer As InkRecognizer = _
        theInkRecognizers.GetPriorityInkRecognizer(&H11, _
            InkRecognizerCapabilities.BoxedInput)

firstJapaneseBoxedInputRecognizer.SetAsHighestPriorityInkRecognizer()

Dim priorityInkRecognizer As InkRecognizer = theInkRecognizers.GetPriorityInkRecognizer()

'firstJapaneseBoxedInputRecognizer and priorityInkRecognizer are equal
'only if the firstJapaneseBoxedInputRecognizer supports the default locale.
InkRecognizerCollection theInkRecognizers = 
    theInkAnalyzer.GetInkRecognizersByPriority();

// Get the first recognizer from the InkRecognizerCollection that supports
// both region neutral Japanese and boxed input.
InkRecognizer firstJapaneseBoxedInputRecognizer =
    theInkRecognizers.GetPriorityInkRecognizer(0x0011,
        InkRecognizerCapabilities.BoxedInput);

firstJapaneseBoxedInputRecognizer.SetAsHighestPriorityInkRecognizer();

InkRecognizer priorityInkRecognizer = theInkRecognizers.GetPriorityInkRecognizer();

//firstJapaneseBoxedInputRecognizer and priorityInkRecognizer are equal
//only if the firstJapaneseBoxedInputRecognizer supports the default locale.

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

InkRecognizer Class
InkRecognizer Members
System.Windows.Ink Namespace