The Unit type exposes the following members.

Methods

  Name Description
Public method ConvertUnit(UnitTypeEnum)
Attempts to convert the current unit value to other unit of measurement.

Only absolute units can be converted. This method throws an exception if the conversion cannot be performed.

Public method ConvertUnit(UnitTypeEnum, Single)
Attempts to convert the current unit value to other unit of measurement.

Only absolute units can be converted. This method throws an exception if the conversion cannot be performed.

Public method ConvertUnit(Single, UnitTypeEnum, Single)
Attempts to convert the current unit value to other unit of measurement.

Only absolute units can be converted. This method throws an exception if the conversion cannot be performed.

Public method Equals
Compares the current unit value with another object.
(Overrides ValueType..::..Equals(Object).)
Public method Static member FromObject
Attempts to convert an object to a unit value. This method throws an exception if the conversion cannot be performed.
Public method GetHashCode
Gets the hash code for the current unit value.
(Overrides ValueType..::..GetHashCode()()()().)
Public method ToString
Returns a string that represents the current object.
(Overrides ValueType..::..ToString()()()().)

Operators

  Name Description
Public operator Static member Equality
Tests whether the two unit values are equal.
Public operator Static member Inequality
Tests whether the two unit values are not equal.

Properties

  Name Description
Public property Static member Auto
Gets a Unit representing an "auto" value.
Public property Static member BoldLineWidth
Gets a Unit value representing the default "bold" line thickness (2 points wide).
Public property Static member Empty
Gets a Unit representing an emtpy (zero) value.
Public property IsAbs
Gets a value indicating whether the current unit represents an absolute value (such as "1mm", "2in", "3em" and so on).
Public property IsAuto
Gets a value indicating whether the current unit represents an "auto" value.
Public property IsEmpty
Gets a value indicating whether the current unit represents an empty value.
Public property IsParent
Gets a value indicating whether the current unit is specified as "parent".
Public property IsParentHeight
Gets a value indicating whether the current unit is specified as "parent.height".
Public property IsParentWidth
Gets a value indicating whether the current unit is specified as "parent.width".
Public property Static member LineWidth
Gets a Unit value representing the default line thickness (1 point wide).
Public property Units
Gets the unit of measurement of the current unit.
Public property Value
Gets the absolute value of the current unit (in Units).

See Also