Back to DOM
UnitsEnum
Definition
- Namespace
- DOM.Enums
- Assembly
- DOM.dll
Specifies a unit of measurement used throughout the DOM.
Remarks
Used wherever a is constructed from a numeric value or when a unit name needs to be specified explicitly. The values cover the standard typographic (points, twips) and physical (inches, centimeters, millimeters) units, plus the Office-specific EMU and a special Percentage marker. DocumentUnit
Examples
csharp
1// 1. Inches
2var u = new DocumentUnit(1.0, Units.inch);
3
csharp
1// 2. Centimeters
2var u = new DocumentUnit(2.54, Units.cm);
3
csharp
1// 3. Points
2var u = new DocumentUnit(12, Units.pt);
3
csharp
1// 4. EMU
2var u = new DocumentUnit(127000, Units.EMU);
3
Fields
cm
Centimeters.
EMU
English Metric Units (EMU).
inch
Inches.
mm
Millimeters.
Percentage
Percentage (relative sizing).
pt
Points (1/72 inch).
Twips
Twips (twentieths of a point).