System.Web.UI.WebControls.Unit.Pixel Method

Creates a System.Web.UI.WebControls.Unit of type UnitType.Pixel from the specified 32-bit signed integer.

Syntax

public static Unit Pixel (int n)

Parameters

n
A 32-bit signed integer that represents the length of the System.Web.UI.WebControls.Unit.

Returns

A System.Web.UI.WebControls.Unit of type UnitType.Pixel that represents the length specified by the n parameter.

Remarks

Use the Unit.Pixel(int) static method to create a System.Web.UI.WebControls.Unit of type UnitType.Pixel that represents the length specified by the n parameter.

Note:

The System.Web.UI.WebControls.Unit class can represent values only between -32768 and 32767.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0