Click or drag to resize

FontMeasureString Method

Measures the specified string to get its size in logical pixels.

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.4.0
public SizeF MeasureString(
	string text


Type: SystemString
Text string to measure.

Return Value

Type: SizeF
The size of the text in logical pixels if drawn using Graphics.DrawText.
This is equivalent to MeasureString(Font, String). When you have a Graphics object, it is recommended to use that to measure the string if available, as it may be more efficient and take into account the current graphics state.
See Also