skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class UnitHelper

Provides methods for conversion between units.

Inheritance
System.Object
UnitHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.Utilities
Assembly: Telerik.Windows.Documents.Spreadsheet.dll

Syntax

public static class UnitHelper

Methods

CmToDip(Double)

Converts centimeters to dips.

Declaration
public static double CmToDip(double value)
Parameters
System.Double value

Centimeters.

Returns
System.Double

Pixels.

DipToCm(Double)

Converts dips to centimeters.

Declaration
public static double DipToCm(double value)
Parameters
System.Double value

Pixels.

Returns
System.Double

Centimeters.

DipToEmu(Double)

Converts dips to EMUs.

Declaration
public static double DipToEmu(double value)
Parameters
System.Double value

Dips.

Returns
System.Double

EMUs.

DipToInch(Double)

Converts dips to inches.

Declaration
public static double DipToInch(double value)
Parameters
System.Double value

Pixels.

Returns
System.Double

Inches.

DipToMm(Double)

Converts dips to milimeters.

Declaration
public static double DipToMm(double value)
Parameters
System.Double value

Pixels.

Returns
System.Double

Millimeters.

DipToPica(Double)

Converts dips to picas.

Declaration
public static double DipToPica(double value)
Parameters
System.Double value

Pixels.

Returns
System.Double

Picas.

DipToPoint(Double)

Converts dips to points.

Declaration
public static double DipToPoint(double value)
Parameters
System.Double value

Pixels.

Returns
System.Double

Points.

DipToPointI(Double)

Converts dips to points.

Declaration
public static int DipToPointI(double value)
Parameters
System.Double value

Pixels.

Returns
System.Int32

Points.

DipToTwip(Double)

Converts dips to twips.

Declaration
public static double DipToTwip(double value)
Parameters
System.Double value

Pixels.

Returns
System.Double

Twips.

DipToTwipF(Double)

Converts dips to twips.

Declaration
public static float DipToTwipF(double value)
Parameters
System.Double value

Pixels.

Returns
System.Single

Twips.

DipToTwipI(Double)

Converts dips to twips.

Declaration
public static int DipToTwipI(double value)
Parameters
System.Double value

Pixels.

Returns
System.Int32

Twips.

DipToUnit(Double, UnitType)

Converts DIPs to units.

Declaration
public static double DipToUnit(double value, UnitType type)
Parameters
System.Double value

Pixels.

UnitType type

Unit type.

Returns
System.Double

Units.

EmuToDip(Double)

Converts EMUs to dips.

Declaration
public static double EmuToDip(double value)
Parameters
System.Double value

EMUs.

Returns
System.Double

Pixels.

ExcelColumnWidthToPixelWidth(Workbook, Double)

Converts excel column width to pixels width.

Declaration
public static double ExcelColumnWidthToPixelWidth(Workbook workbook, double width)
Parameters
Workbook workbook

The workbook.

System.Double width

The width.

Returns
System.Double

InchToDip(Double)

Converts inches to dips.

Declaration
public static double InchToDip(double value)
Parameters
System.Double value

Inches.

Returns
System.Double

Pixels.

MmToDip(Double)

Converts milimeteres to dips.

Declaration
public static double MmToDip(double value)
Parameters
System.Double value

Millimeteres.

Returns
System.Double

Pixels.

PicaToDip(Double)

Converts to points dips.

Declaration
public static double PicaToDip(double value)
Parameters
System.Double value

Picas.

Returns
System.Double

Pixels.

PixelWidthToExcelColumnWidth(Workbook, Double)

Converts column width in pixels to excel column width.

Declaration
public static double PixelWidthToExcelColumnWidth(Workbook workbook, double pixels)
Parameters
Workbook workbook

The workbook.

System.Double pixels

The pixels.

Returns
System.Double

PointToDip(Double)

Converts points to dips.

Declaration
public static double PointToDip(double value)
Parameters
System.Double value

Points.

Returns
System.Double

Pixels.

TwipToDip(Double)

Converts twips to dips.

Declaration
public static double TwipToDip(double value)
Parameters
System.Double value

Twips.

Returns
System.Double

Pixels.

TwipToDipF(Double)

Converts twips to dips.

Declaration
public static float TwipToDipF(double value)
Parameters
System.Double value

Twips.

Returns
System.Single

Dips.

TwipToDipI(Double)

Converts twips to dips.

Declaration
public static int TwipToDipI(double value)
Parameters
System.Double value

Twips.

Returns
System.Int32

Dips.

UnitToDip(Double, UnitType)

Converts Units to dips.

Declaration
public static double UnitToDip(double value, UnitType type)
Parameters
System.Double value

Units.

UnitType type

Unit type.

Returns
System.Double

Pixels.

Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.