InkRecognizerCollection.GetPriorityInkRecognizer 方法

获取集合中支持默认区域设置的第一个 InkRecognizer

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public Function GetPriorityInkRecognizer As InkRecognizer
用法
Dim instance As InkRecognizerCollection
Dim returnValue As InkRecognizer

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

返回值

类型:System.Windows.Ink.InkRecognizer
集合中支持默认区域设置的第一个 InkRecognizer,如果集合为空,则为 nullnull 引用(在 Visual Basic 中为 Nothing) 引用(在 Visual Basic 中为 Nothing)。

示例

下面的示例获取支持日语和框式输入的 InkRecognizer,并将它设置为最高优先级 InkRecognizer。然后,代码调用 GetPriorityInkRecognizer() 以获取默认区域设置的最高优先级 InkRecognizer。仅当默认区域设置设置为日语时,这两个 InkRecognizer 对象才相等。

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.

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkRecognizerCollection 类

InkRecognizerCollection 成员

GetPriorityInkRecognizer 重载

System.Windows.Ink 命名空间