ClassUnitHelper
Converts between device-independent pixels (dips) and various measurement units (points, picas, inches, centimeters, twips, EMUs) for layout and sizing.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Utilities
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Syntax:
public static class UnitHelper
Inheritance: objectUnitHelper
Methods
CmToDip(double)
Converts centimeters to dips using the 96 DPI standard (1 inch = 2.54 cm).
DipToCm(double)
Converts dips to centimeters using the 96 DPI standard (1 inch = 2.54 cm).
DipToEmu(double)
Converts dips to English Metric Units (EMUs) used in Office Open XML (1 EMU = 1/914400 inch).
DipToInch(double)
Converts dips to inches using the 96 DPI standard (96 dips = 1 inch).
DipToMm(double)
Converts dips to millimeters using the 96 DPI standard (1 cm = 10 mm).
DipToPica(double)
Converts dips to picas using the 96 DPI standard (1 pica = 1/6 inch = 12 points).
DipToPoint(double)
Converts dips to points using the 96 DPI standard (1 inch = 72 points).
DipToPointI(double)
Converts dips to points and rounds to the nearest integer.
DipToTwip(double)
Converts dips to twips using the 96 DPI standard (1 twip = 1/1440 inch = 1/20 point).
DipToTwipF(double)
Converts dips to twips and returns as a single-precision float.
DipToTwipI(double)
Converts dips to twips and rounds to the nearest integer.
DipToUnit(double, UnitType)
Converts dips to the specified unit type, dispatching to the appropriate conversion method.
EmuToDip(double)
Converts English Metric Units (EMUs) to dips using the 96 DPI standard (1 EMU = 1/914400 inch).
ExcelColumnWidthToPixelWidth(Workbook, double)
Converts Excel's character-based column width units to pixel width, based on the Normal style's maximum digit width.
InchToDip(double)
Converts inches to dips using the 96 DPI standard (96 dips = 1 inch).
MmToDip(double)
Converts millimeters to dips using the 96 DPI standard (1 cm = 10 mm).
PicaToDip(double)
Converts picas to dips using the 96 DPI standard (1 pica = 1/6 inch = 12 points).
PixelWidthToExcelColumnWidth(Workbook, double)
Converts pixel width to Excel's character-based column width units, based on the Normal style's maximum digit width.
PointToDip(double)
Converts points to dips using the 96 DPI standard (1 inch = 72 points).
TwipToDip(double)
Converts twips to dips using the 96 DPI standard (1 twip = 1/1440 inch = 1/20 point).
TwipToDipF(double)
Converts twips to dips and returns as a single-precision float.
TwipToDipI(double)
Converts twips to dips and truncates to an integer.
UnitToDip(double, UnitType)
Converts the specified unit type to dips, dispatching to the appropriate conversion method.