Freigeben über


RecognizerGuide.DrawnBox Property

Gets or sets the rectangle that is physically drawn on the tablet screen and in which writing takes place.

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

Syntax

'Declaration
Public Property DrawnBox As Rectangle
'Usage
Dim instance As RecognizerGuide
Dim value As Rectangle

value = instance.DrawnBox

instance.DrawnBox = value
public Rectangle DrawnBox { get; set; }
public:
property Rectangle DrawnBox {
    Rectangle get ();
    void set (Rectangle value);
}
/** @property */
public Rectangle get_DrawnBox ()

/** @property */
public void set_DrawnBox (Rectangle value)
public function get DrawnBox () : Rectangle

public function set DrawnBox (value : Rectangle)
Not applicable.

Property Value

The rectangle that is physically drawn on the tablet screen and in which writing takes place, relative to the top left of the writing box.

Remarks

The lines of the drawn box are visual cues that specify where writing can take place. The user normally writes within the boundaries of the lines.

Another rectangle, the writing box, is the invisible box in which writing can actually take place. It is larger than the drawn box and provides a margin of error to users if they draw ink outside the lines of the drawn box. Use the WritingBox property to set the writing box.

The writing box specifies the boundaries of the ink to the recognizer. The drawn box is drawn using ink space coordinates, relative to the top left of the writing box.

Example

This C# example sets all of the values in the guide simultaneously.

private void ResetGuideSettings(
    ref RecognizerGuide theRecognizerGuide,
    int columns,
    int rows,
    int midline,
    Rectangle drawnBox,
    Rectangle writingBox)
{
    theRecognizerGuide.Columns = columns;
    theRecognizerGuide.Rows = rows;
    theRecognizerGuide.Midline = midline;
    theRecognizerGuide.DrawnBox = drawnBox;
    theRecognizerGuide.WritingBox = writingBox;
}

This Microsoft® Visual Basic® .NET example sets all of the values in the guide simultaneously.

Private Sub ResetGuideSettings( _
ByRef theRecognizerGuide As RecognizerGuide, _
ByVal columns As Integer, _
ByVal rows As Integer, _
ByVal midline As Integer, _
ByVal drawnBox As Rectangle, _
ByVal writingBox As Rectangle)
    theRecognizerGuide.Columns = columns
    theRecognizerGuide.Rows = rows
    theRecognizerGuide.Midline = midline
    theRecognizerGuide.DrawnBox = drawnBox
    theRecognizerGuide.WritingBox = writingBox
End Sub

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

RecognizerGuide Structure
RecognizerGuide Members
Microsoft.Ink Namespace
RecognizerGuide.WritingBox