Recognizer.CreateRecognizerContext Method
Creates a new RecognizerContext object for this Recognizer object.
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 function CreateRecognizerContext() : RecognizerContext
Return Value
Type: Microsoft.Ink.RecognizerContext
The new RecognizerContext object.
Examples
In this example, two RecognizerContext objects are instantiated using different techniques. Both RecognizerContext objects have an association with the default 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);
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0