[]
Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.
SizeF MeasureString(string text, Font font)
Type | Name | Description |
---|---|---|
string | text | String to measure. |
Font | font | Font object that defines the appearance and size of the text. |
Type | Description |
---|---|
SizeF | The size of the string expressed in points. |
Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.
SizeF MeasureString(string text, Font font, float width)
Type | Name | Description |
---|---|---|
string | text | String to measure. |
Font | font | Font object that defines the appearance and size of the text. |
float | width | Maximum width of the string. |
Type | Description |
---|---|
SizeF | The size of the string expressed in points. |
Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.
SizeF MeasureString(string text, Font font, float width, StringFormat sf)
Type | Name | Description |
---|---|---|
string | text | String to measure. |
Font | font | Font object that defines the appearance and size of the text. |
float | width | Maximum width of the string. |
StringFormat | sf | A StringFormat object that determines whether word wrapping is allowed. |
Type | Description |
---|---|
SizeF | The size of the string expressed in points. |