タブレット画面で物理的に描画され、手書きを行うことができる四角形を取得または設定します。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Property DrawnBox As Rectangle
'使用
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)
プロパティ値
型 : System.Drawing.Rectangle
手書きボックスの左上を基準にした、タブレット画面で物理的に描画され、手書きを行うことができる四角形。
解説
描画ボックスの線は、手書きを行うことができる場所を指定するビジュアル キューです。ユーザーは、通常線の境界内に手書きを行います。
もう 1 つの四角形 (手書きボックス) は、実際に手書きを行うことができる表示されないボックスです。これは、描画ボックスより大きいため、ユーザーが描画ボックスの線の外側にインクを描画した場合の許容誤差となります。手書きボックスを設定するには、WritingBox プロパティを使用します。
手書きボックスは、認識エンジンにインクの境界を指定します。描画ボックスは、手書きボックスの左上を基準としたインク空間座標を使用して描画されます。
例
この例では、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