共用方式為


InkRecognizerGuide 建構函式

初始化 InkRecognizerGuide 類別的新執行個體。

命名空間:  System.Windows.Ink
組件:  IAWinFX (在 IAWinFX.dll 中)

語法

'宣告
Public Sub New ( _
    rows As Integer, _
    columns As Integer, _
    midline As Double, _
    writingBoxLeft As Double, _
    writingBoxTop As Double, _
    writingBoxRight As Double, _
    writingBoxBottom As Double, _
    drawnBoxLeft As Double, _
    drawnBoxTop As Double, _
    drawnBoxRight As Double, _
    drawnBoxBottom As Double _
)
'用途
Dim rows As Integer
Dim columns As Integer
Dim midline As Double
Dim writingBoxLeft As Double
Dim writingBoxTop As Double
Dim writingBoxRight As Double
Dim writingBoxBottom As Double
Dim drawnBoxLeft As Double
Dim drawnBoxTop As Double
Dim drawnBoxRight As Double
Dim drawnBoxBottom As Double

Dim instance As New InkRecognizerGuide(rows, columns, _
    midline, writingBoxLeft, writingBoxTop, _
    writingBoxRight, writingBoxBottom, _
    drawnBoxLeft, drawnBoxTop, drawnBoxRight, _
    drawnBoxBottom)
public InkRecognizerGuide(
    int rows,
    int columns,
    double midline,
    double writingBoxLeft,
    double writingBoxTop,
    double writingBoxRight,
    double writingBoxBottom,
    double drawnBoxLeft,
    double drawnBoxTop,
    double drawnBoxRight,
    double drawnBoxBottom
)
public:
InkRecognizerGuide(
    int rows, 
    int columns, 
    double midline, 
    double writingBoxLeft, 
    double writingBoxTop, 
    double writingBoxRight, 
    double writingBoxBottom, 
    double drawnBoxLeft, 
    double drawnBoxTop, 
    double drawnBoxRight, 
    double drawnBoxBottom
)
public InkRecognizerGuide(
    int rows,
    int columns,
    double midline,
    double writingBoxLeft,
    double writingBoxTop,
    double writingBoxRight,
    double writingBoxBottom,
    double drawnBoxLeft,
    double drawnBoxTop,
    double drawnBoxRight,
    double drawnBoxBottom
)
public function InkRecognizerGuide(
    rows : int, 
    columns : int, 
    midline : double, 
    writingBoxLeft : double, 
    writingBoxTop : double, 
    writingBoxRight : double, 
    writingBoxBottom : double, 
    drawnBoxLeft : double, 
    drawnBoxTop : double, 
    drawnBoxRight : double, 
    drawnBoxBottom : double
)

參數

  • writingBoxLeft
    型別:System.Double
    辨識器輔助線之不可見書寫區域的左邊座標,使用者可能會在此輔助線內進行書寫。
  • writingBoxTop
    型別:System.Double
    辨識器輔助線之不可見書寫區域的頂端座標,使用者可能會在此輔助線內進行書寫。
  • writingBoxRight
    型別:System.Double
    辨識器輔助線之不可見書寫區域的右邊座標,使用者可能會在此輔助線內進行書寫。
  • writingBoxBottom
    型別:System.Double
    辨識器輔助線之不可見書寫區域的底端座標,使用者可能會在此輔助線內進行書寫。
  • drawnBoxLeft
    型別:System.Double
    實際繪製在手寫板螢幕上,而且是使用者書寫所在之方塊的左邊座標。
  • drawnBoxTop
    型別:System.Double
    實際繪製在手寫板螢幕上,而且是使用者書寫所在之方塊的頂端座標。
  • drawnBoxRight
    型別:System.Double
    實際繪製在手寫板螢幕上,而且是使用者書寫所在之方塊的右邊座標。
  • drawnBoxBottom
    型別:System.Double
    實際繪製在手寫板螢幕上,而且是使用者書寫所在之方塊的底端座標。

備註

InkRecognizerGuide 會藉由定義下列兩個矩形,指定可繪製筆墨的界限:繪製方塊和書寫方塊。繪製方塊的界限為視覺提示,而書寫方塊的界限則是不可見的。兩者共同指定可書寫的位置。使用者通常會在各可見行界限內書寫。繪製方塊是由 DrawnBoxTopDrawnBoxLeftDrawnBoxBottomDrawnBoxRight 屬性指定。這些屬性僅供辨識器使用。設定這些屬性的動作本身並不會在顯示器上繪製視覺線索。您必須使用應用程式或控制項繪製視覺線索。

書寫方塊大於繪製方塊,當使用者在繪製方塊行外繪製筆墨時,可提供容錯邊界。書寫方塊是由 WritingBoxTopWritingBoxLeftWritingBoxBottomWritingBoxRight 屬性指定。

範例

下列範例會建立新的 InkRecognizerGuide,並將它指派至 AnalysisHintNodeGuide 的屬性。

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

請參閱

參考

InkRecognizerGuide 類別

InkRecognizerGuide 成員

System.Windows.Ink 命名空間