Skip to main content
All docs
V24.1

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

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

Namespace: DevExpress.Drawing

Assembly: DevExpress.Drawing.v24.1.dll

NuGet Package: DevExpress.Drawing

Declaration

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

Parameters

Name Type Description
text String

A string to measure.

font DXFont

An object that contains font parameters.

width Single

Specifies the maximum width for this text.

format DXStringFormat

An object that contains text formatting parameters.

Returns

Type Description
SizeF

The string’s measured size.

See Also