Share via


InkRecognizerCollection.GetPriorityInkRecognizer Method

Gets the first InkRecognizer in the collection that supports the default locale.

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

Syntax

'Declaration
Public Function GetPriorityInkRecognizer As InkRecognizer
'Usage
Dim instance As InkRecognizerCollection 
Dim returnValue As InkRecognizer 

returnValue = instance.GetPriorityInkRecognizer()
public InkRecognizer GetPriorityInkRecognizer()
public:
InkRecognizer^ GetPriorityInkRecognizer()
public function GetPriorityInkRecognizer() : InkRecognizer

Return Value

Type: System.Windows.Ink.InkRecognizer
The first InkRecognizer in the collection that supports the default locale, or a nulla null reference (Nothing in Visual Basic) reference (Nothing in Visual Basic) if the collection is empty.

Examples

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 are 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 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

InkRecognizerCollection Class

InkRecognizerCollection Members

GetPriorityInkRecognizer Overload

System.Windows.Ink Namespace