RecognizerContext.Guide Property
Gets or sets the RecognizerGuide to use for ink input.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)
Syntax
'Declaration
Public Property Guide As RecognizerGuide
'Usage
Dim instance As RecognizerContext
Dim value As RecognizerGuide
value = instance.Guide
instance.Guide = value
public RecognizerGuide Guide { get; set; }
public:
property RecognizerGuide Guide {
RecognizerGuide get ();
void set (RecognizerGuide value);
}
/** @property */
public RecognizerGuide get_Guide ()
/** @property */
public void set_Guide (RecognizerGuide value)
public function get Guide () : RecognizerGuide
public function set Guide (value : RecognizerGuide)
Not applicable.
Property Value
The RecognizerGuide to use for ink input.
Remarks
Setting the Guide property succeeds only if the Strokes property is a null reference (Nothing in Visual Basic). You must set the Guide property before you attach a Strokes collection to the Strokes property of the RecognizerContext, or you must set the Strokes property to a null reference (Nothing in Visual Basic) and then set the Guide property.
Note
If you use the latter method, you may need to reattach the Strokes collection to the Strokes property of the RecognizerContext.
The RecognizerCapabilities enumeration contains the FreeInput, LinedInput, and BoxedInput flags. These flags specify the capabilities of a recognizer, but because they are read-only, there is no way to set any of these directly on a Recognizer or RecognizerContext object. The only way to set a recognizer to a specific mode is to set the recognition guide by using the Guide property.
If you do not set the Guide property, the default value is FreeInput mode, assuming that the recognizer is capable of this mode.
The following table lists potential input modes and which values to set the Columns and Rows properties for each mode.
For this type of input |
Set the Rows property to |
And set the Columns property to |
---|---|---|
Free input |
0 |
0 |
Vertical Lined input with 1 line |
0 |
1 |
Vertical Lined input with n lines |
0 |
n |
Horizontal Lined input with 1 line |
1 |
0 |
Horizontal Lined input with n lines |
n |
0 |
Boxed input with 1 box |
1 |
1 |
Boxed input with n boxes |
n |
1 |
Boxed input in a grid of boxes x rows by z columns |
x |
z |
If you set the mode to one that is not available for a Recognizer object, an ArgumentException exception is thrown.
To query which capabilities—or modes—are available from a specific recognizer, use the Capabilities property of the Recognizer object. In Windows Vista, recognizers of Latin script support free input, boxed input, and horizontal lined input; recognizers of East Asian characters support free input and boxed input; and the gesture recognizer supports only free input.
Example
This C# example creates a RecognizerGuide and assigns it to the Guide property of the RecognizerContext object, theRecognizerContext
.
theRecognizerContext.Guide = new RecognizerGuide(rows, columns, midline, rectGuide, rectDrawn);
This Microsoft® Visual Basic® .NET example creates a RecognizerGuide and assigns it to the Guide property of the RecognizerContext object, theRecognizerContext
.
theRecognizerContext.Guide = New RecognizerGuide( _
rows, columns, midline, rectGuide, rectDrawn)
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
RecognizerContext Class
RecognizerContext Members
Microsoft.Ink Namespace
RecognizerGuide
Recognizer
RecognizerCapabilities
Recognizer.Capabilities
RecognizerContext.Strokes
RecognizerGuide.Columns
RecognizerGuide.Rows