MeasureStringWithTrailingWhitespace(String,Font,Single,Nullable<Single>) Method
In This Topic
Measures a string using a specified font, font size and layout width, taking into account the trailing whitespace at the end of each line.
Syntax
'Declaration
Public Overloads Function MeasureStringWithTrailingWhitespace( _
ByVal As System.String, _
ByVal As Font, _
ByVal As System.Single, _
Optional ByVal As System.Nullable(Of Single) _
) As System.Drawing.SizeF
public System.Drawing.SizeF MeasureStringWithTrailingWhitespace(
System.string ,
Font ,
System.float ,
System.Nullable<float>
)
Parameters
- text
- The string to measure.
- font
- The font to use.
- fontSize
- The font size to use.
- width
- The width allocated to draw the string, or null to indicate unlimited width.
Return Value
The size needed to draw the string with trailing whitespace.
See Also