InkEdit.Recognizer 属性
获取或设置 InkEdit 控件使用的 Recognizer 对象。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
<BrowsableAttribute(False)> _
Public Property Recognizer As Recognizer
用法
Dim instance As InkEdit
Dim value As Recognizer
value = instance.Recognizer
instance.Recognizer = value
[BrowsableAttribute(false)]
public Recognizer Recognizer { get; set; }
[BrowsableAttribute(false)]
public:
property Recognizer^ Recognizer {
Recognizer^ get ();
void set (Recognizer^ value);
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public Recognizer get_Recognizer()
/** @property */
/** @attribute BrowsableAttribute(false) */
public void set_Recognizer(Recognizer value)
public function get Recognizer () : Recognizer
public function set Recognizer (value : Recognizer)
属性值
类型:Microsoft.Ink.Recognizer
InkEdit 控件使用的识别器。
备注
返回的默认识别器是活动输入区域设置的默认识别器。若要选择活动的输入区域设置,请在控制面板的“区域和语言选项”中,在“语言”选项卡上单击“详细信息”,然后选择“默认输入语言”。
此属性仅在运行时可用。
仅当 Status 属性返回 InkEditStatus 枚举值 Idle 时才应更改此属性。
如果为 InkEdit 控件使用了智能标记,则在设置 Recognizer 属性之后必须重新应用该智能标记。
示例
在此示例中,如果能够识别西班牙语 的 Recognizer 对象可用,则将 InkEdit 控件的 Recognizer 属性设置为使用该对象。
If InkEditStatus.Idle = mInkEdit.Status Then
Const LCID_Spanish As Integer = &HC0A
' get all the Recognizers
Dim allR As Recognizers = New Recognizers()
' check each Recognizer
For Each R As Recognizer In allR
' check each supported language of the Recognizer
For Each LCID As Integer In R.Languages
' if the language == Spanish, change the Recognizer
If LCID_Spanish = LCID Then
mInkEdit.Recognizer = R
End If
Next
Next
' display the name of the recognizer in the InkEdit control
mInkEdit.Text = mInkEdit.Recognizer.Name + Environment.NewLine
End If
if (InkEditStatus.Idle == mInkEdit.Status)
{
const int LCID_Spanish = 0x0C0A;
// get all the Recognizers
Recognizers allR = new Recognizers();
// check each Recognizer
foreach (Recognizer R in allR)
{
// check each supported language of the Recognizer
foreach (int LCID in R.Languages)
{
// if the language == Spanish, change the Recognizer
if (LCID_Spanish == LCID)
{
mInkEdit.Recognizer = R;
}
}
}
// display the name of the recognizer in the InkEdit control
mInkEdit.Text = mInkEdit.Recognizer.Name + Environment.NewLine;
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0