Search
Diagram.MeasureUnit Property
See Also
 






Gets or sets the unit of measure used for logical coordinates in this diagram.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public MeasureUnit MeasureUnit { get; set; }

Visual Basic  Copy Code

Public Property MeasureUnit As MeasureUnit

 Property Value

An instance of the MeasureUnit class. The default value is Millimeter.

 Remarks

Many properties in the MindFusion.Diagramming for .NET MAUI API are used to specify the dimensions of diagram items or the size of various visual elements, for example, selection handles, arrowhead shapes, frame widths, and so on. MeasureUnit specifies the measure of length in which these size values are defined.

Changing the measure unit does not automatically rescale the size-related property values. Your application must set appropriate values to: Bounds, GridSizeX, GridSizeY, GridOffsetX, GridOffsetY, AdjustmentHandlesSize, LinkBaseShapeSize, LinkHeadShapeSize, LinkIntermediateShapeSize, TableCaptionHeight, TableColumnWidth, TableRowHeight, CrossingRadius, ShadowOffsetX, ShadowOffsetY and to the size-related members of RoutingOptions.

Changing the measure unit resets RoutingOptions to default values for the new unit, because performance might suffer greatly if the routing algorithm uses too big or too small GridSize.

The arguments passed to some methods depend on the measure unit too, for example, CreateShapeNode, CreateTableNode, GetNodeAt, GetLinkAt.

The following MeasureUnit members provide ready-to-use measure units:

Member name

Description

Centimeter

Specifies centimeters as the unit of measure.

Document

Specifies the document unit (1/300 inch) as the unit of measure.

Inch

Specifies the inch as the unit of measure.

Millimeter

Specifies the millimeter as the unit of measure.

Pixel

Specifies a device pixel as the unit of measure. Note that print and on-screen output will differ greatly in size when using pixels because printer pixels are much smaller than screen ones.

Point

Specifies a printer's point (1/72 inch) as the unit of measure.

 See Also