Back to Devexpress

PaperKindData.Unit Property

xtrareports-devexpress-dot-xtrareports-dot-wizards-dot-labels-dot-paperkinddata.md

latest2.7 KB
Original Source

PaperKindData.Unit Property

Specifies the unit of measure of a paper kind.

Namespace : DevExpress.XtraReports.Wizards.Labels

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
public DXGraphicsUnit Unit { get; set; }
vb
Public Property Unit As DXGraphicsUnit

Property Value

TypeDescription
DXGraphicsUnit

An enumeration value that indicates the measurement unit.

|

Available values:

NameDescription
World

The world coordinate system unit.

| | Display |

The measurement units of the display device. Typically pixels for video displays, and 1/100 inch for printers.

| | Pixel |

The device pixel.

| | Point |

The printer’s point (1/72 inch).

| | Inch |

The inch.

| | Document |

The document unit (1/300 inch).

| | Millimeter |

The millimeter.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Unit property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-winforms-label-report-in-code/VB/Reporting_how-to-create-a-label-report-at-runtime-t473792/LabelReportRuntime/CustomLabelReportBuilder.vb#L95

vb
Private Shared Function ConvertToPaperKindItem(ByVal paperKindData As PaperKindData) As PaperKindItem
    Dim dpi As Single = DevExpress.XtraPrinting.GraphicsDpi.UnitToDpi(CType(paperKindData.Unit, System.Drawing.GraphicsUnit))
    Dim paperKind = CType(paperKindData.EnumId, DXPaperKind)

See Also

PaperKindData Class

PaperKindData Members

DevExpress.XtraReports.Wizards.Labels Namespace