中線の高さを取得または設定します。中線の高さは、描画ボックスのベースラインから中線までの距離です。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Property Midline As Integer
'使用
Dim instance As RecognizerGuide
Dim value As Integer
value = instance.Midline
instance.Midline = value
public int Midline { get; set; }
public:
property int Midline {
int get ();
void set (int value);
}
/** @property */
public int get_Midline()
/** @property */
public void set_Midline(int value)
public function get Midline () : int
public function set Midline (value : int)
プロパティ値
型 : System.Int32
ガイドの中線の高さ (HIMETRIC 単位)。
解説
中線が存在しない場合、値は 0 です。
例
この例では、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