All docs
V20.2
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxDiagram.Units Property

Specifies the measurement unit for size properties.

Namespace: DevExpress.Web.ASPxDiagram

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

Declaration

[DefaultValue(DiagramUnit.In)]
public DiagramUnit Units { get; set; }
<DefaultValue(DiagramUnit.In)>
Public Property Units As DiagramUnit

Property Value

Type Default Description
DiagramUnit

In

The unit.

Available values:

Name Description
In

Inch

Cm

Centimeter

Px

Pixel

Remarks

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

User interface elements display measurements in ViewUnits.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px" Units="Px"
    NodesDataSourceID="FlowNodesDemoDataSource" EdgesDataSourceID="FlowEdgesDemoDataSource" >
    <Mappings>
        <Node Key="ID" Type="Type" Width="Width" Height="Height" />
        <Edge Key="ID" FromKey="FromID" ToKey="ToID" Text="Text" />
    </Mappings>
</dx:ASPxDiagram>

Run Demo: Node and Edge Data Sources

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