共用方式為


RecognizerGuide.DrawnBox Property

RecognizerGuide.DrawnBox Property

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

Definition

Visual Basic .NET Public Property DrawnBox As Rectangle
C# public Rectangle DrawnBox { get; set; }
Managed C++ public: __property Rectangle* get_DrawnBox();
public: __property void set_DrawnBox(Rectangle*);

Property Value

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

This property is read/write. This property has no default value.

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 box, 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. You can 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 units, relative to the top left of the writing box.

Examples

[C#]

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;
}

[Visual Basic .NET]

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

See Also