Measures the specified string when drawn with a given Font object into a rectangle with the specified width.

Namespace:  C1.Silverlight.Pdf
Assembly:  C1.Silverlight.Pdf (in C1.Silverlight.Pdf.dll)

Syntax

C#
public Size MeasureString(
	string text,
	Font font,
	double width
)
Visual Basic
Public Function MeasureString ( _
	text As String, _
	font As Font, _
	width As Double _
) As Size

Parameters

text
Type: System..::..String
String to measure.
font
Type: C1.Silverlight.Pdf..::..Font
Font object that defines the appearance and size of the text.
width
Type: System..::..Double
Maximum width of the string.

Return Value

The size of the string expressed in points.

Remarks

This overload wraps the string to prevent any lines from getting wider than the width parameter. The value returned contains the given width and the height needed to render the entire string.

See Also