Recognizer.Id 属性
获取 Recognizer 对象的 ID。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public ReadOnly Property Id As Guid
用法
Dim instance As Recognizer
Dim value As Guid
value = instance.Id
public Guid Id { get; }
public:
property Guid Id {
Guid get ();
}
/** @property */
public Guid get_Id()
public function get Id () : Guid
属性值
类型:System.Guid
Recognizer 对象的 ID。
备注
此属性是 Microsoft.Ink 6.0 版程序集中的新属性。
示例
此示例使用不同的方式实例化两个 RecognizerContext 对象。两个 RecognizerContext 对象与默认 Recognizer 均有关联,这是通过比较 Id 属性而确定的。
' create a new RecognizerContext object
Dim mRecognizerContext1 As RecognizerContext = New RecognizerContext()
' When you create a new RecognizerContext object via the .ctor
' as shown above, it is associated with the default Recognizer.
'
' You could also obtain the RecognizerContext object in this manner:
Dim allRecognizers As Recognizers = New Recognizers()
Dim defaultRecognizer As Recognizer = allRecognizers.GetDefaultRecognizer()
Dim mRecognizerContext2 As RecognizerContext = defaultRecognizer.CreateRecognizerContext()
' same recognizer either way
Dim thisIsTrue As Boolean = (mRecognizerContext1.Recognizer.Id = mRecognizerContext2.Recognizer.Id)
// create a new RecognizerContext object
RecognizerContext mRecognizerContext1 = new RecognizerContext();
// When you create a new RecognizerContext object via the .ctor
// as shown above, it is associated with the default Recognizer.
//
// You could also obtain the RecognizerContext object in this manner:
Recognizers allRecognizers = new Recognizers();
Recognizer defaultRecognizer = allRecognizers.GetDefaultRecognizer();
RecognizerContext mRecognizerContext2 = defaultRecognizer.CreateRecognizerContext();
// same recognizer either way
bool thisIsTrue = (mRecognizerContext1.Recognizer.Id == mRecognizerContext2.Recognizer.Id);
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0