PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.8 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / ConvertUnit Method / ConvertUnit(Unit,UnitTypeEnum,Single) Method
The source C1.C1Preview.Unit value to convert (must be an absolute value).
The destination unit type (C1.C1Preview.UnitTypeEnum).
The destination resolution (DPI; used if the destUnitType is C1.C1Preview.UnitTypeEnum.Pixel).

In This Topic
    ConvertUnit(Unit,UnitTypeEnum,Single) Method
    In This Topic
    Converts an absolute C1.C1Preview.Unit value to the specified measurement units.
    Syntax
    'Declaration
     
    Public Overloads Function ConvertUnit( _
       ByVal source As Unit, _
       ByVal destUnitType As UnitTypeEnum, _
       ByVal destDpi As Single _
    ) As Double
    public double ConvertUnit( 
       Unit source,
       UnitTypeEnum destUnitType,
       float destDpi
    )

    Parameters

    source
    The source C1.C1Preview.Unit value to convert (must be an absolute value).
    destUnitType
    The destination unit type (C1.C1Preview.UnitTypeEnum).
    destDpi
    The destination resolution (DPI; used if the destUnitType is C1.C1Preview.UnitTypeEnum.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