Skip to main content
All docs
V24.1

BrickGraphics.MeasureString(String, DXFont) Method

Calculates the length of a specified text.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public SizeF MeasureString(
    string text,
    DXFont font
)

Parameters

Name Type Description
text String

The text to measure.

font DXFont

An object that contains font information.

Returns

Type Description
SizeF

The text length.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MeasureString(String, DXFont) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also