Excel for WPF and Silverlight
PixelsToTwips Method (C1XLBook)

C1.WPF.Excel Namespace > C1XLBook Class : PixelsToTwips Method
Measurement in screen pixels.
Converts a pixel measurement into twips (1/20th of a point).
Syntax
'Declaration
 
Public Shared Function PixelsToTwips( _
   ByVal pix As System.Double _
) As System.Integer
public static System.int PixelsToTwips( 
   System.double pix
)

Parameters

pix
Measurement in screen pixels.

Return Value

Measurement in twips.
Remarks

Excel stores measurements in twips (1/20th of a point), a resolution-independent unit. .NET controls, on the other hand, usually express measurements in pixels. This method provides an easy way to convert pixel measurements into twips using the current screen resolution.

See Also

Reference

C1XLBook Class
C1XLBook Members
TwipsToPixels Method