UnitType Class

UnitType class

Specifies the unit of measurement.

public sealed class UnitType : IEquatable<UnitType>

Methods

NameDescription
override Equals(object)Determines whether the specified Object, is equal to this instance.
Equals(UnitType)Determines whether the specified UnitType, is equal to this instance.
override GetHashCode()Returns a hash code for this instance.
override ToString()Returns a String that represents this instance.
operator ==Determines whether the two specified UnitType values are equal.
explicit operatorPerforms an explicit conversion from UnitType to String.
implicit operatorPerforms an implicit conversion from String to UnitType.
operator !=Determines whether the two specified UnitType values are not equal.

Fields

NameDescription
static readonly AutoMeasurement is not defined.
static readonly ChMeasurement is relative to width of the “0” (zero).
static readonly CmMeasurement is in centimeters
static readonly DegMeasurement is in degrees.
static readonly DpcmMeasurement is in dots per centimeters.
static readonly DpiMeasurement is in dots per inch.
static readonly DppxMeasurement is in Dots per pixels unit.
static readonly EmMeasurement is relative to the height of the parent element’s font.
static readonly ExMeasurement is relative to the height of the lowercase letter x of the parent element’s font.
static readonly GradMeasurement is in gradians.
static readonly HzMeasurement is in hertz.
static readonly InMeasurement is in inches
static readonly IntegerMeasurement is an integer number.
static readonly KHzMeasurement is in kiloHertz.
static readonly MmMeasurement is in millimeters
static readonly MsMeasurement is in milliseconds.
static readonly PcMeasurement is in picas
static readonly PercentageMeasurement is in percentage.
static readonly PtMeasurement is in points
static readonly PxMeasurement is in pixels
static readonly QMeasurement is in quarter-millimeters
static readonly RadMeasurement is in radians.
static readonly RealMeasurement is a real number.
static readonly RemMeasurement is relative to font-size of the root element.
static readonly SMeasurement is in seconds.
static readonly TurnMeasurement is in turns.
static readonly VhMeasurement is relative to 1% of the height of the viewport* Try it
static readonly VmaxMeasurement is relative to 1% of viewport’s* larger dimension Try it
static readonly VminMeasurement is relative to 1% of viewport’s* smaller dimension Try it
static readonly VwMeasurement is relative to 1% of the width of the viewport*

See Also