다음을 통해 공유


RecognizerGuide.WritingBox 속성

업데이트: 2007년 11월

실제로 필기를 할 수 있는 인식 안내선의 보이지 않는 쓰기 영역을 가져오거나 설정합니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Public Property WritingBox As Rectangle
‘사용 방법
Dim instance As RecognizerGuide
Dim value As Rectangle

value = instance.WritingBox

instance.WritingBox = value
public Rectangle WritingBox { get; set; }
public:
property Rectangle WritingBox {
    Rectangle get ();
    void set (Rectangle value);
}
/** @property */
public Rectangle get_WritingBox()
/** @property */
public  void set_WritingBox(Rectangle value)
public function get WritingBox () : Rectangle
public function set WritingBox (value : Rectangle)

속성 값

형식: System.Drawing.Rectangle
잉크 공간 좌표에 있는 안내선 상자의 사각형 쓰기 영역입니다.

설명

쓰기 상자는 그려진 상자의 바깥에 실수로 필기해도 무방한 여백을 제공합니다. 이는 사용자가 쓰기를 수행하는 태블릿 화면에 실제로 그려지는 선입니다. 그려진 상자를 설정하려면 DrawnBox 속성을 사용합니다.

예제

이 예제에서는 RecognizerContext 개체를 인스턴스화하고 새 RecognizerGuide 개체를 만들어 Guide 속성을 할당합니다.

' create a new RecognizerContext object
mRecognizerContext = New RecognizerContext()
' if the Recognizer supports LinedInput, set the Guide
If (mRecognizerContext.Recognizer.Capabilities And RecognizerCapabilities.LinedInput) <> 0 Then
    ' get the lower right corner in pixel units
    Dim lowerRight As Point = New Point(mInkOverlay.AttachedControl.Width, mInkOverlay.AttachedControl.Height)
    ' convert to ink space units
    mInkOverlay.Renderer.PixelToInkSpace(Me.CreateGraphics(), lowerRight)
    ' create Rectangles
    Dim writingBox As Rectangle = New Rectangle(0, 0, lowerRight.X, lowerRight.Y)
    Dim drawnBox As Rectangle = New Rectangle(0, 0, lowerRight.X, lowerRight.Y)
    ' shrink drawn box relative to writing box
    drawnBox.Inflate(-100, -100)
    ' create Guide with 8 rows, zero columns, and no midline
    Dim guide As RecognizerGuide = New RecognizerGuide(8, 0, 0, writingBox, drawnBox)
    mRecognizerContext.Guide = guide
End If
// create a new RecognizerContext object
mRecognizerContext = new RecognizerContext();
// if the Recognizer supports LinedInput, set the Guide
if ((mRecognizerContext.Recognizer.Capabilities & RecognizerCapabilities.LinedInput) != 0)
{
    // get the lower right corner in pixel units
    Point lowerRight = new Point(mInkOverlay.AttachedControl.Width, mInkOverlay.AttachedControl.Height);
    // convert to ink space units
    mInkOverlay.Renderer.PixelToInkSpace(this.CreateGraphics(), ref lowerRight);
    // create Rectangles
    Rectangle writingBox = new Rectangle(0, 0, lowerRight.X, lowerRight.Y);
    Rectangle drawnBox = new Rectangle(0, 0, lowerRight.X, lowerRight.Y);
    // shrink drawn box relative to writing box
    drawnBox.Inflate(-100, -100);
    // create Guide with 8 rows, zero columns, and no midline
    RecognizerGuide guide = new RecognizerGuide(8, 0, 0, writingBox, drawnBox);
    mRecognizerContext.Guide = guide;
}

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

RecognizerGuide 구조체

RecognizerGuide 멤버

Microsoft.Ink 네임스페이스

RecognizerGuide.DrawnBox