Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of the InkRecognizerGuide class.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public Sub New ( _
rows As Integer, _
columns As Integer, _
midline As Double, _
writingBoxLeft As Double, _
writingBoxTop As Double, _
writingBoxRight As Double, _
writingBoxBottom As Double, _
drawnBoxLeft As Double, _
drawnBoxTop As Double, _
drawnBoxRight As Double, _
drawnBoxBottom As Double _
)
'Usage
Dim rows As Integer
Dim columns As Integer
Dim midline As Double
Dim writingBoxLeft As Double
Dim writingBoxTop As Double
Dim writingBoxRight As Double
Dim writingBoxBottom As Double
Dim drawnBoxLeft As Double
Dim drawnBoxTop As Double
Dim drawnBoxRight As Double
Dim drawnBoxBottom As Double
Dim instance As New InkRecognizerGuide(rows, columns, _
midline, writingBoxLeft, writingBoxTop, _
writingBoxRight, writingBoxBottom, _
drawnBoxLeft, drawnBoxTop, drawnBoxRight, _
drawnBoxBottom)
public InkRecognizerGuide(
int rows,
int columns,
double midline,
double writingBoxLeft,
double writingBoxTop,
double writingBoxRight,
double writingBoxBottom,
double drawnBoxLeft,
double drawnBoxTop,
double drawnBoxRight,
double drawnBoxBottom
)
public:
InkRecognizerGuide(
int rows,
int columns,
double midline,
double writingBoxLeft,
double writingBoxTop,
double writingBoxRight,
double writingBoxBottom,
double drawnBoxLeft,
double drawnBoxTop,
double drawnBoxRight,
double drawnBoxBottom
)
public function InkRecognizerGuide(
rows : int,
columns : int,
midline : double,
writingBoxLeft : double,
writingBoxTop : double,
writingBoxRight : double,
writingBoxBottom : double,
drawnBoxLeft : double,
drawnBoxTop : double,
drawnBoxRight : double,
drawnBoxBottom : double
)
Parameters
- rows
Type: System.Int32
- columns
Type: System.Int32
- midline
Type: System.Double
writingBoxLeft
Type: System.DoubleThe left coordinate of the invisible writing area of the recognizer guide in which writing can occur.
writingBoxTop
Type: System.DoubleThe top coordinate of the invisible writing area of the recognizer guide in which writing can occur.
writingBoxRight
Type: System.DoubleThe right coordinate of the invisible writing area of the recognizer guide in which writing can occur.
writingBoxBottom
Type: System.DoubleThe bottom coordinate of the invisible writing area of the recognizer guide in which writing can occur.
drawnBoxLeft
Type: System.DoubleThe left coordinate of the box that is physically drawn on the tablet screen and in which writing can occur.
drawnBoxTop
Type: System.DoubleThe top coordinate of the box that is physically drawn on the tablet screen and in which writing can occur.
drawnBoxRight
Type: System.DoubleThe right coordinate of the box that is physically drawn on the tablet screen and in which writing can occur.
drawnBoxBottom
Type: System.DoubleThe bottom coordinate of the box that is physically drawn on the tablet screen and in which writing can occur.
Remarks
The InkRecognizerGuide specifies the boundaries where ink can be drawn by defining two rectangles; the drawn box and the writing box. The boundaries of the drawn box are visual cues, and the boundaries for the writing box are invisible. Together, they specify where writing can take place. The user normally writes within the boundaries of the visible lines. The drawn box is specified by the DrawnBoxTop, DrawnBoxLeft, DrawnBoxBottom, and DrawnBoxRight properties. These properties are for the recognizer's use only. Setting them does not, by itself, draw visual clues on the display. You must draw the visual clues by using the application or the control.
The writing box is larger than the drawn box and provides the users a margin of error if they draw ink outside the lines of the drawn box. The writing box is specified by the WritingBoxTop, WritingBoxLeft, WritingBoxBottom, and WritingBoxRight properties.
Examples
The following example creates a new InkRecognizerGuide and assigns it to the Guide property of an AnalysisHintNode.
Dim guideBoxTop As Double = 0
Dim guideBoxBottom As Double = 50
Dim guideBoxLeft As Double = 0
Dim guideBoxRight As Double = 600
Dim WRITINGBOXMARGIN As Integer = 10
' Find the midline of the guide box.
Dim midline As Double = (guideBoxBottom - guideBoxTop) / 2 + guideBoxTop
theGuide.Rows = 1
theGuide.Columns = 0
theGuide.Midline = midline
theGuide.WritingBoxLeft = guideBoxLeft - WRITINGBOXMARGIN
theGuide.WritingBoxTop = guideBoxTop - WRITINGBOXMARGIN
theGuide.WritingBoxRight = guideBoxRight + WRITINGBOXMARGIN
theGuide.WritingBoxBottom = guideBoxBottom + WRITINGBOXMARGIN
theGuide.DrawnBoxLeft = guideBoxLeft
theGuide.DrawnBoxTop = guideBoxTop
theGuide.DrawnBoxRight = guideBoxRight
theGuide.DrawnBoxBottom = guideBoxBottom
double guideBoxTop = 0;
double guideBoxBottom = 50;
double guideBoxLeft = 0;
double guideBoxRight = 600;
const int WRITINGBOXMARGIN = 10;
// Find the midline of the guide box.
double midline = (guideBoxBottom - guideBoxTop) / 2 + guideBoxTop;
theGuide.Rows = 1;
theGuide.Columns = 0;
theGuide.Midline = midline;
theGuide.WritingBoxLeft = guideBoxLeft - WRITINGBOXMARGIN;
theGuide.WritingBoxTop = guideBoxTop - WRITINGBOXMARGIN;
theGuide.WritingBoxRight = guideBoxRight + WRITINGBOXMARGIN;
theGuide.WritingBoxBottom = guideBoxBottom + WRITINGBOXMARGIN;
theGuide.DrawnBoxLeft = guideBoxLeft;
theGuide.DrawnBoxTop = guideBoxTop;
theGuide.DrawnBoxRight = guideBoxRight;
theGuide.DrawnBoxBottom = guideBoxBottom;
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
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