[]
        
(Showing Draft Content)

C1.C1Word.C1WordDocument.MeasureString

MeasureString Method

MeasureString(string, Font, float, StringFormat, int)

Measure string for this document.

Declaration
public static SizeF MeasureString(string text, Font font, float width, StringFormat sf, int firstChar)
Public Shared Function MeasureString(text As String, font As Font, width As Single, sf As StringFormat, firstChar As Integer) As SizeF
Parameters
Type Name Description
string text

The drawing string.

Font font

The drawing font.

float width

The drawing width or -1 for default.

StringFormat sf

The drawing string format.

int firstChar

The zero-based starting character position of a string.

Returns
Type Description
SizeF

The size, in points, of the string specified as drawn with the font parameter.

MeasureString(string, Font)

Measure string for this document.

Declaration
public SizeF MeasureString(string text, Font font)
Public Function MeasureString(text As String, font As Font) As SizeF
Parameters
Type Name Description
string text

The drawing string.

Font font

The drawing font.

Returns
Type Description
SizeF

The size, in points, of the string specified as drawn with the font parameter.

MeasureString(string, Font, float)

Measure string for this document.

Declaration
public SizeF MeasureString(string text, Font font, float width)
Public Function MeasureString(text As String, font As Font, width As Single) As SizeF
Parameters
Type Name Description
string text

The drawing string.

Font font

The drawing font.

float width

The drawing width or -1 for default.

Returns
Type Description
SizeF

The size, in points, of the string specified as drawn with the font parameter.

MeasureString(string, Font, float, StringFormat)

Measure string for this document.

Declaration
public SizeF MeasureString(string text, Font font, float width, StringFormat sf)
Public Function MeasureString(text As String, font As Font, width As Single, sf As StringFormat) As SizeF
Parameters
Type Name Description
string text

The drawing string.

Font font

The drawing font.

float width

The drawing width or -1 for default.

StringFormat sf

The drawing string format.

Returns
Type Description
SizeF

The size, in points, of the string specified as drawn with the font parameter.