Partager via


Recognizer.CreateRecognizerContext, méthode

Mise à jour : November 2007

Crée un objet RecognizerContext pour cet objet Recognizer.

Espace de noms :  Microsoft.Ink
Assembly :  Microsoft.Ink (dans Microsoft.Ink.dll)

Syntaxe

'Déclaration
Public Function CreateRecognizerContext As RecognizerContext
'Utilisation
Dim instance As Recognizer
Dim returnValue As RecognizerContext

returnValue = instance.CreateRecognizerContext()
public RecognizerContext CreateRecognizerContext()
public:
RecognizerContext^ CreateRecognizerContext()
public RecognizerContext CreateRecognizerContext()
public function CreateRecognizerContext() : RecognizerContext

Valeur de retour

Type : Microsoft.Ink.RecognizerContext
Nouvel objet RecognizerContext.

Exemples

Dans cet exemple, deux objets RecognizerContext sont instanciés à l'aide de techniques différentes. Les deux objets RecognizerContext sont associés au Recognizer par défaut.

' 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);

Plateformes

Windows Vista

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Framework

Pris en charge dans : 3.0

Voir aussi

Référence

Recognizer, classe

Membres Recognizer

Microsoft.Ink, espace de noms

RecognizerContext