Freigeben über


Recognizer.CreateRecognizerContext-Methode

Erstellt ein neues RecognizerContext-Objekt für dieses Recognizer-Objekt.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Function CreateRecognizerContext As RecognizerContext
'Usage
Dim instance As Recognizer
Dim returnValue As RecognizerContext

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

Rückgabewert

Typ: Microsoft.Ink.RecognizerContext
Das neue RecognizerContext-Objekt.

Beispiele

In diesem Beispiel werden zwei RecognizerContext-Objekte auf unterschiedliche Weise instanziiert. Beide RecognizerContext-Objekte verfügen über eine Zuordnung mit dem Standard-Recognizer.

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

Plattformen

Windows Vista

.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.

Versionsinformationen

.NET Framework

Unterstützt in: 3.0

Siehe auch

Referenz

Recognizer-Klasse

Recognizer-Member

Microsoft.Ink-Namespace

RecognizerContext