Gets or sets the default unit of measurement for the current document. This unit is used when sizes or coordinates of objects within the document are set without specifying the unit of measurement explicitly.

The default value is Inch.

Namespace:  C1.C1Preview
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
[DefaultValueAttribute(UnitTypeEnum.Inch)]
[XmlAttributeAttribute("DefaultUnit")]
public UnitTypeEnum DefaultUnit { get; set; }
Visual Basic
<DefaultValueAttribute(UnitTypeEnum.Inch)> _
<XmlAttributeAttribute("DefaultUnit")> _
Public Property DefaultUnit As UnitTypeEnum
	Get
	Set

Remarks

The default value for this property is UnitTypeEnum.Inch.

Examples

The following example uses the DefaultUnit property to define the unit of measurement for the document:

Copy CodeVisual Basic
' Create the new print document object.
Dim printDocument As C1.C1Preview.C1PrintDocument = New C1.C1Preview.C1PrintDocument 
' Set the default paper size and orientation.
printDocument.PageLayout.PageSettings.Landscape = True 
printDocument.DefaultUnit = C1.C1Preview.UnitTypeEnum.Mm
Copy CodeC#
// Create the new print document object.
C1.C1Preview.C1PrintDocument printDocument = new C1.C1Preview.C1PrintDocument (); 
// Sets the default paper size and orientation.
printDocument.PageLayout.PageSettings.Landscape = true;
printDocument.DefaultUnit = C1.C1Preview.UnitTypeEnum.Mm;

See Also