Gets or sets the unit of measure used for logical coordinates in this diagram.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public GraphicsUnit MeasureUnit { get; set; } |
Visual Basic Copy Code |
---|
Public Property MeasureUnit As GraphicsUnit |
An instance of the GraphicsUnit class. The default is WpfPoint.
Many properties in the WpfDiagram 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 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, ViewToDiagram and DiagramToView, GetNodeAt, GetLinkAt, ZoomToRect.
The following GraphicsUnit members can be used as WpfDiagram measure units:
Member name | Description |
---|---|
Specifies the inch as the unit of measure. | |
Specifies the millimeter as the unit of measure. | |
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. | |
Specifies a printer's point (1/72 inch) as the unit of measure. |
WpfDiagram Programmer's Guide | © 2024 MindFusion |