Share via


InkRecognizerGuide.Columns Property

Gets or sets the number of columns in the recognition guide.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public Property Columns As Integer
'Usage
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);
}
public function get Columns () : int 
public function set Columns (value : int)

Property Value

Type: System.Int32
The number of columns in the recognition guide.

Remarks

Column width is determined by the size of the drawn box. To get or set the drawn box, use the DrawnBoxTop, DrawnBoxLeft, DrawnBoxBottom, and DrawnBoxRight properties.

Use the values of Columns and Rows properties to control the kind of recognition input that you use. When Columns and Rows are both greater than zero, boxed input is used. The following table lists potential input modes and which values to set the Columns and Rows properties for each mode.

For the following input,

set the Rows property to:

And set the Columns property to:

Free input

0

0

Vertical Lined input with 1 line

0

1

Vertical Lined input with n lines

0

N

Horizontal Lined input with 1 line

1

0

Horizontal Lined input with n lines

n

0

Boxed input with 1 box

1

1

Boxed input with 1 column of n boxes

1

N

Boxed input in a grid of boxes x rows by z columns

x

Z

Examples

The following sets all of the values in the InkRecognizerGuide simultaneously.

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;

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizerGuide Class

InkRecognizerGuide Members

System.Windows.Ink Namespace

InkRecognizerGuideDrawnBox

InkRecognizerGuide.Rows