Skip to main content

GraphicsCache.CalcTextSize(String, Font, SizeF) Method

Calculates the size of the specified string when it’s drawn with the specified font.

Namespace: DevExpress.Utils.Drawing

Assembly: DevExpress.Utils.v24.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

public SizeF CalcTextSize(
    string text,
    Font font,
    SizeF layoutArea
)

Parameters

Name Type Description
text String

A String value which represents a string to measure.

font Font

A Font object which defines the font and the associated settings of the text.

layoutArea SizeF

A SizeF structure that specifies the maximum layout area for the text.

Returns

Type Description
SizeF

A SizeF structure which represents the size (in pixels) of the string.

See Also