Skip to main content

ASPxDiagram.ViewUnits Property

Specifies the measurement unit that is displayed in user interface elements.

Namespace: DevExpress.Web.ASPxDiagram

Assembly: DevExpress.Web.ASPxDiagram.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(DiagramUnit.In)]
public DiagramUnit ViewUnits { get; set; }

Property Value

Type Default Description
DiagramUnit In

The unit.

Available values:

Name Description
In

Inch

Cm

Centimeter

Px

Pixel

Remarks

The ViewUnits property specifies the measurement unit that is displayed in the Properties panel and in the diagram work area.

<dx:ASPxDiagram ID="Diagram" runat="server" ViewUnits="Cm">
</dx:ASPxDiagram>

View Units

Use the Units property to specify the unit for measurement properties in a diagram, for instance, DefaultHeight (custom shape properties), Size (grid properties), or Left (node and edge data-bound settings).

When you export a diagram, the control saves the diagram’s data in its own text format. The resulting JSON object contains measurements in twips, regardless of the Units or ViewUnits property values. Do not modify this JSON object because modified data can load incorrectly.

See Also