BrickGraphics.MeasureString(String, Font, Int32, StringFormat, GraphicsUnit) Method

Measures the height and width of the specified text string.

Namespace: DevExpress.XtraPrinting

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


public static SizeF MeasureString(
    string text,
    Font font,
    int width,
    StringFormat stringFormat,
    GraphicsUnit pageUnit
Public Shared Function MeasureString(
    text As String,
    font As Font,
    width As Integer,
    stringFormat As StringFormat,
    pageUnit As GraphicsUnit
) As SizeF


Name Type Description
text String

String to measure.

font Font

A Font object that defines the text format of the string.

width Int32

An integer value specifying the maximum width of the measured string.

stringFormat StringFormat

A StringFormat object that represents the string's formatting.

pageUnit GraphicsUnit

A GraphicsUnit enumeration value that specifies the unit of measurement for the return value.


Type Description

This method returns a SizeF structure that represents the size, measured in pixels.


This method is similar to the standard MeasureString method, and is used for more precise calculations.

See Also