Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

UnitType Enumeration

Specifies the unit of measurement.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
public enum UnitType
Member nameDescription
PixelMeasurement is in pixels.
PointMeasurement is in points. A point represents 1/72 of an inch.
PicaMeasurement is in picas. A pica represents 12 points.
InchMeasurement is in inches.
MmMeasurement is in millimeters.
CmMeasurement is in centimeters.
PercentageMeasurement is a percentage relative to the parent element.
EmMeasurement is relative to the height of the parent element's font.
ExMeasurement is relative to the height of the lowercase letter x of the parent element's font.

The UnitType enumeration represents the different supported measurement units. Measurements can be represented in pixels, points, picas, inches, millimeters, centimeters, percentages, em, or ex.

A Point is a unit of measurement that represents 1/72 of an inch.

A Pica is a unit that equals 12 points.

A Percentage is a unit of measurement that is relative to a parent element. For example, if the font size of a paragraph is 10 pixels, you can place a phrase inside the paragraph with a font size specified as 200%. The font size of the phrase becomes twice the font size of the paragraph, or 20 pixels.

An Em is a unit of measurement that is relative to the height of a parent element's font. For example, if the font size of a paragraph is 10 pixels, you can place a phrase inside the paragraph with a font size specified as 2 em. The font size of the phrase becomes twice the font size of the paragraph, or 20 pixels.

An Ex is a unit of measurement that is relative to the height of the lowercase letter x of the parent element's font. For example if the font size of a paragraph is 10 pixels, you can place a phrase inside the paragraph with a font size specified as 2 ex. The font size of the phrase becomes twice the font size of a lowercase letter x in the paragraph.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.