[]
        
(Showing Draft Content)

C1.Util.IFlowDocument.MeasureString

MeasureString Method

MeasureString(string, Font)

Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.

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

String to measure.

Font font

Font object that defines the appearance and size of the text.

Returns
Type Description
SizeF

The size of the string expressed in points.

MeasureString(string, Font, float)

Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.

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

String to measure.

Font font

Font object that defines the appearance and size of the text.

float width

Maximum width of the string.

Returns
Type Description
SizeF

The size of the string expressed in points.

MeasureString(string, Font, float, StringFormat)

Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.

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

String to measure.

Font font

Font object that defines the appearance and size of the text.

float width

Maximum width of the string.

StringFormat sf

A StringFormat object that determines whether word wrapping is allowed.

Returns
Type Description
SizeF

The size of the string expressed in points.