InkRecognizerGuide.Midline 屬性
取得或設定中線高度。中線高度是繪製方塊從基線到中線的距離。
命名空間: System.Windows.Ink
組件: IAWinFX (在 IAWinFX.dll 中)
語法
'宣告
Public Property Midline As Double
'用途
Dim instance As InkRecognizerGuide
Dim value As Double
value = instance.Midline
instance.Midline = value
public double Midline { get; set; }
public:
property double Midline {
double get ();
void set (double value);
}
/** @property */
public double get_Midline()
/** @property */
public void set_Midline(double value)
public function get Midline () : double
public function set Midline (value : double)
屬性值
型別:System.Double
輔助線的中線高度。
備註
中線是一條想像水平線,每個字元主體的頂端都會對齊這條線,但主體上延伸的小寫字母部分除外。
如果中線不存在,則傳回值為 0。
範例
下列動作會同時設定 InkRecognizerGuide 中的所有值。
Dim guideBoxTop As Double = 0
Dim guideBoxBottom As Double = 50
Dim guideBoxLeft As Double = 0
Dim guideBoxRight As Double = 600
Dim WRITINGBOXMARGIN As Integer = 10
' Find the midline of the guide box.
Dim midline As Double = (guideBoxBottom - guideBoxTop) / 2 + guideBoxTop
theGuide.Rows = 1
theGuide.Columns = 0
theGuide.Midline = midline
theGuide.WritingBoxLeft = guideBoxLeft - WRITINGBOXMARGIN
theGuide.WritingBoxTop = guideBoxTop - WRITINGBOXMARGIN
theGuide.WritingBoxRight = guideBoxRight + WRITINGBOXMARGIN
theGuide.WritingBoxBottom = guideBoxBottom + WRITINGBOXMARGIN
theGuide.DrawnBoxLeft = guideBoxLeft
theGuide.DrawnBoxTop = guideBoxTop
theGuide.DrawnBoxRight = guideBoxRight
theGuide.DrawnBoxBottom = guideBoxBottom
double guideBoxTop = 0;
double guideBoxBottom = 50;
double guideBoxLeft = 0;
double guideBoxRight = 600;
const int WRITINGBOXMARGIN = 10;
// Find the midline of the guide box.
double midline = (guideBoxBottom - guideBoxTop) / 2 + guideBoxTop;
theGuide.Rows = 1;
theGuide.Columns = 0;
theGuide.Midline = midline;
theGuide.WritingBoxLeft = guideBoxLeft - WRITINGBOXMARGIN;
theGuide.WritingBoxTop = guideBoxTop - WRITINGBOXMARGIN;
theGuide.WritingBoxRight = guideBoxRight + WRITINGBOXMARGIN;
theGuide.WritingBoxBottom = guideBoxBottom + WRITINGBOXMARGIN;
theGuide.DrawnBoxLeft = guideBoxLeft;
theGuide.DrawnBoxTop = guideBoxTop;
theGuide.DrawnBoxRight = guideBoxRight;
theGuide.DrawnBoxBottom = guideBoxBottom;
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0