[]
Measures a string using a specified font, font size and layout width, taking into account the trailing whitespace at the end of each line.
public SizeF MeasureStringWithTrailingWhitespace(string text, Font font, float fontSize, float? width = null)
Public Function MeasureStringWithTrailingWhitespace(text As String, font As Font, fontSize As Single, Optional width As Single? = Nothing) As SizeF
Type | Name | Description |
---|---|---|
string | text | The string to measure. |
Font | font | The font to use. |
float | fontSize | The font size to use. |
float? | width | The width allocated to draw the string, or null to indicate unlimited width. |
Type | Description |
---|---|
SizeF | The size needed to draw the string with trailing whitespace. |
Measures a string using a specified TextFormat, taking into account the trailing whitespace at the end of each line.
public SizeF MeasureStringWithTrailingWhitespace(string text, TextFormat textFormat, float? width = null)
Public Function MeasureStringWithTrailingWhitespace(text As String, textFormat As TextFormat, Optional width As Single? = Nothing) As SizeF
Type | Name | Description |
---|---|---|
string | text | The string to measure. |
TextFormat | textFormat | The text format to use. |
float? | width | The width allocated to draw the string, or null to indicate unlimited width. |
Type | Description |
---|---|
SizeF | The size needed to draw the string with trailing whitespace. |