BrickGraphics.MeasureString(String, Font, Int32, StringFormat) Method
In This Article
Calculates the length of a specified text.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Printing.v24.2.Core.dll
NuGet Package: DevExpress.Printing.Core
#Declaration
public SizeF MeasureString(
string text,
Font font,
int width,
StringFormat stringFormat
)
#Parameters
Name | Type | Description |
---|---|---|
text | String | A String value. |
font | Font | A Font object. |
width | Int32 | An integer value. |
string |
String |
A String |
#Returns
Type | Description |
---|---|
Size |
A Size |
#Remarks
This method overload uses GDI/GDI+ rendering and works only on Windows OS. The
PlatformNotSupportedException
is thrown on other operating systems. Use the BrickGraphics.MeasureString(String, DXFont, Int32, DXStringFormat) overload in non-Windows environments.
See Also