Skip to main content

GraphicsUnitConverter.Convert(Single, GraphicsUnit, GraphicsUnit) Method

Adjusts the floating-point value calculated for the specified unit of measure according to a new unit of measure.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Data.v23.1.dll

NuGet Package: DevExpress.Data


public static float Convert(
    float val,
    GraphicsUnit fromUnit,
    GraphicsUnit toUnit


Name Type Description
val Single

A Single value.

fromUnit GraphicsUnit

A GraphicsUnit enumeration value, specifying the initial unit of measure.

toUnit GraphicsUnit

A GraphicsUnit enumeration value, specifying the required unit of measure.


Type Description

A Single value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Convert(Single, GraphicsUnit, GraphicsUnit) method.


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