InkRecognizerGuide.Columns 属性

获取或设置recognition guide中的列数。

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public Property Columns As Integer
用法
Dim instance As InkRecognizerGuide
Dim value As Integer

value = instance.Columns

instance.Columns = value
public int Columns { get; set; }
public:
property int Columns {
    int get ();
    void set (int value);
}
/** @property */
public int get_Columns()
/** @property */
public  void set_Columns(int value)
public function get Columns () : int
public function set Columns (value : int)

属性值

类型:System.Int32
识别参考线中的列数。

备注

列宽由绘制框的大小确定。若要获取或设置绘制框,请使用 DrawnBoxTopDrawnBoxLeftDrawnBoxBottomDrawnBoxRight 属性。

使用 Columns 和 Rows 属性的值可以控制所使用的识别输入的类型。当 Columns 和 Rows 都大于零时,使用框式输入。下表列出了可能的输入模式以及在每种模式下要为 Columns 和 Rows 属性设置的值。

对于以下输入

Rows 属性设置为

并将 Columns 属性设置为

自由输入

0

0

只有 1 行的垂直行输入

0

1

具有 n 行的垂直行输入

0

N

只有 1 行的水平行输入

1

0

具有 n 行的水平行输入

n

0

具有 1 个框的框式输入

1

1

具有 1 列 n 个框的框式输入

1

N

具有 x 行 z 列的框网格的框式输入

x

Z

示例

下面的示例同时设置 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

另请参见

参考

InkRecognizerGuide 类

InkRecognizerGuide 成员

System.Windows.Ink 命名空间

InkRecognizerGuideDrawnBox()

InkRecognizerGuide.Rows