Share via


RecognizerContext.Recognizer Property

Gets the Recognizer object used by the RecognizerContext object.

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

Syntax

'Declaration
Public ReadOnly Property Recognizer As Recognizer
'Usage
Dim instance As RecognizerContext 
Dim value As Recognizer 

value = instance.Recognizer
public Recognizer Recognizer { get; }
public:
property Recognizer^ Recognizer {
    Recognizer^ get ();
}
public function get Recognizer () : Recognizer

Property Value

Type: Microsoft.Ink.Recognizer
The Recognizer object.

Examples

In this example, two RecognizerContext objects are instantiated using different techniques. The Recognizer property of each of the two RecognizerContext objects references the same (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

See Also

Reference

RecognizerContext Class

RecognizerContext Members

Microsoft.Ink Namespace

RecognizerContext

Recognizer