Converts an absolute Unit value to the specified measurement units.

Namespace:  C1.C1Preview
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
public double ConvertUnit(
	Unit source,
	UnitTypeEnum destUnitType,
	float destDpi
)
Visual Basic
Public Function ConvertUnit ( _
	source As Unit, _
	destUnitType As UnitTypeEnum, _
	destDpi As Single _
) As Double

Parameters

source
Type: C1.C1Preview..::..Unit
The source Unit value to convert (must be an absolute value).
destUnitType
Type: C1.C1Preview..::..UnitTypeEnum
The destination unit type (UnitTypeEnum).
destDpi
Type: System..::..Single
The destination resolution (DPI; used if the destUnitType is Pixel).

Return Value

A double representing the source value expressed in destUnitType units.

Remarks

The source must be an absolute value, such as "5mm", "1.5in", "8" and so on. The source cannot be an expression (such as "prev.width" or "prev.height*2+2mm").

See Also