'Declaration
Public Overloads Shared Function MeasureString( _
ByVal As System.String, _
ByVal As System.Drawing.Font, _
ByVal As System.Single, _
ByVal As System.Drawing.StringFormat _
) As System.Drawing.SizeF
public static System.Drawing.SizeF MeasureString(
System.string ,
System.Drawing.Font ,
System.float ,
System.Drawing.StringFormat
)
Parameters
- text
- String to measure.
- font
- System.Drawing.Font object that defines the text format of the string.
- width
- Maximum width of the string.
- sf
- System.Drawing.StringFormat object that represents formatting information, such as line spacing, for the string.
Return Value
A System.Drawing.SizeF structure that contains the width and height of the string (in points) when rendered with a given font.