Skip to main content
A newer version of this page is available. .

AppearanceObject.CalcTextSizeInt(GraphicsCache, String, Int32) Method

Calculates the length of the specified string.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v19.2.dll

Declaration

public Size CalcTextSizeInt(
    GraphicsCache cache,
    string s,
    int width
)

Parameters

Name Type Description
cache GraphicsCache

A GraphicsCache object that provides storage for pens, fonts and brushes.

s String

The string to measure.

width Int32

An integer value specifying the maximum width of the string (in pixels).

Returns

Type Description
Size

A Size structure that is the size of the string (in pixels).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CalcTextSizeInt(GraphicsCache, String, Int32) 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