Skip to main content
All docs
V23.2

DXGraphics.MeasureString(String, DXFont, SizeF, DXStringFormat) Method

Measures the specified string when drawn with the specified font, text layout size, and format.

Namespace: DevExpress.Drawing

Assembly: DevExpress.Drawing.v23.2.dll

NuGet Package: DevExpress.Drawing

Declaration

public SizeF MeasureString(
    string text,
    DXFont font,
    SizeF layoutArea,
    DXStringFormat format
)

Parameters

Name Type Description
text String

A string to measure.

font DXFont

An object that contains font parameters.

layoutArea SizeF

Specifies the maximum layout area for the text.

format DXStringFormat

An object that contains text formatting parameters.

Returns

Type Description
SizeF

The string’s measured size.

See Also