In The Hand LtdIn The Hand
MeasureString Method (g, text, font, layoutArea)
NamespacesInTheHand.DrawingGraphicsHelperMeasureString(Graphics, String, Font, SizeF)
.NET Components for Mobility
Measures the specified string when drawn with the specified Font within the specified layout area.
Declaration Syntax
C#Visual Basic
public static SizeF MeasureString(
	Graphics g,
	string text,
	Font font,
	SizeF layoutArea
)
Public Shared Function MeasureString ( _
	g As Graphics, _
	text As String, _
	font As Font, _
	layoutArea As SizeF _
) As SizeF
Parameters
g (Graphics)
Graphics instance.
text (String)
String to measure.
font (Font)
Font defines the text format of the string.
layoutArea (SizeF)
SizeF structure that specifies the maximum layout area for the text.
Return Value
This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified by the text parameter as drawn with the font parameter.

Assembly: InTheHand.Drawing (Module: InTheHand.Drawing) Version: 7.0.0.0