InkRecognizer.SetAsHighestPriorityInkRecognizer 方法
在 InkAnalyzer 对象的识别器列表中,将此 InkRecognizer 设置为最高优先级。
命名空间: System.Windows.Ink
程序集: IAWinFX(在 IAWinFX.dll 中)
语法
声明
Public Sub SetAsHighestPriorityInkRecognizer
用法
Dim instance As InkRecognizer
instance.SetAsHighestPriorityInkRecognizer()
public void SetAsHighestPriorityInkRecognizer()
public:
void SetAsHighestPriorityInkRecognizer()
public void SetAsHighestPriorityInkRecognizer()
public function SetAsHighestPriorityInkRecognizer()
备注
SetAsHighestPriorityInkRecognizer 方法将当前 InkRecognizer 设置为最高优先级。当两个或更多识别器支持相同的语言和功能时,调用 SetAsHighestPriorityInkRecognizer 可确保 InkAnalyzer 使用此 InkRecognizer。
备注
将此 InkRecognizer 设置为最高优先级并不意味着 InkAnalyzer 使用此 InkRecognizer 来分析墨迹。InkAnalyzer 使用最高优先级 InkRecognizer,除非在将笔画添加到 InkAnalyzer 时指定区域设置 ID,否则最高优先级识别器支持默认区域设置。
示例
下面的示例获取支持日语和框式输入的 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