• Product Bundles

    DevCraft

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

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Unit

Contains methods for converting DIP (Device Independent Pixels) to other unit types.

Inheritance
System.Object
Unit
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.Media
Assembly: Telerik.Windows.Documents.Core.dll

Syntax

public static class Unit

Methods

CmToDip(Double)

Converts centimeters to dips.

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

Centimeters.

Returns
System.Double

Pixels.

DegreeToWavelength(Double)

Converts degree to wave length.

Declaration
public static double DegreeToWavelength(double degrees)
Parameters
System.Double degrees

Angle in degrees.

Returns
System.Double

Angle in 60000ths of degree.

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

Pixels.

Returns
System.Double

EMUs.

DipToEmuI(Double)

Converts dips to EMUs.

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

Pixels.

Returns
System.Int32

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 millimeters.

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 pixels)
Parameters
System.Double pixels

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

UnitType.

Returns
System.Double

Units.

EmToPixel(Double, Double)

Converts units of measurement to pixels.

Declaration
public static double EmToPixel(double basePixelSize, double value)
Parameters
System.Double basePixelSize

Base pixel size.

System.Double value

Ems.

Returns
System.Double

Pixels.

EmuToDip(Double)

Converts EMUs to dips.

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

EMUs.

Returns
System.Double

Pixels.

InchToDip(Double)

Converts inches to dips.

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

Inches.

Returns
System.Double

Pixels.

IsRelativeUnitType(UnitType)

Determines whether unit type is relative.

Declaration
public static bool IsRelativeUnitType(UnitType type)
Parameters
UnitType type

The unit type.

Returns
System.Boolean

MmToDip(Double)

Converts millimeters to dips.

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

Millimeters.

Returns
System.Double

Pixels.

PercentToPixel(Double, Double)

Converts percents to pixels.

Declaration
public static double PercentToPixel(double basePixelSize, double value)
Parameters
System.Double basePixelSize

Base pixel size.

System.Double value

Percents.

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.

PixelToEm(Double, Double)

Converts pixels to units of measurement.

Declaration
public static double PixelToEm(double basePixelSize, double value)
Parameters
System.Double basePixelSize

Base pixel size.

System.Double value

Pixels.

Returns
System.Double

Ems.

PixelToPercent(Double, Double)

Converts pixels to percents.

Declaration
public static double PixelToPercent(double basePixelSize, double value)
Parameters
System.Double basePixelSize

Base pixel size.

System.Double value

Pixels.

Returns
System.Double

Percents.

PixelToUnit(Double, Double, UnitType)

Converts Pixels the unit.

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

Base pixel size.

System.Double value

Pixel.

UnitType type

The type.

Returns
System.Double

PointToDip(Double)

Converts to points 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

UnitType.

Returns
System.Double

Pixels.

UnitToPixel(Double, Double, UnitType)

Converts Units to pixel.

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

Base pixel size.

System.Double value

The value.

UnitType type

The type.

Returns
System.Double

WavelengthToDegree(Int32)

Converts wave length to degree.

Declaration
public static double WavelengthToDegree(int wavelength)
Parameters
System.Int32 wavelength

wave length.

Returns
System.Double

Points.

WavelengthToDegree(Int64)

Converts wave length to degree.

Declaration
public static double WavelengthToDegree(long wavelength)
Parameters
System.Int64 wavelength

wave length.

Returns
System.Double

Points.

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • 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.