Click or drag to resize

LengthDefaultUnit Property

Gets or sets the default measurement unit that is applied globally every time Length is converted from/to a Double and to a String.

Namespace:  GemBox.Presentation
Assembly:  GemBox.Presentation (in GemBox.Presentation.dll) Version: 21.3.35.1032 (21.3.35.1032)
Syntax
public static LengthUnit DefaultUnit { get; set; }

Property Value

Type: LengthUnit
The default measurement unit.
Remarks

Initial value is Point.

This property makes code less verbose and, thus, easier to read and maintain because instead of using From(Double, LengthUnit), To(LengthUnit) and ToString(LengthUnit) methods, one can use implicit conversions from/to a Double and to a String.

Since default measurement unit is applied globally (like any other member), it is advisable not to set DefaultUnit property or use implicit conversions from/to a Double and to a String if GemBox.Presentation is used by various application functions that expect different default measurement unit, especially if usage is multi-threaded.

See Also