Articles in this section
Category / Section

How to customize the ruler units in WPF Diagram (SfDiagram)?

1 min read

The Ruler feature provides a Horizontal and Vertical guide for measuring in the WPF Diagram (SfDiagram) control. This feature can be used to measure the Diagram objects, indicate positions, and align diagram elements. We have provided support to customize the Ruler units. We have provided code example to represent this. Please refer to the below code example.

C#

// Adding Rulers
diagram.HorizontalRuler = new Ruler();
diagram.VerticalRuler = new Ruler() { Orientation = Orientation.Vertical };
// Customizing the Ruler Unit
(diagram.PageSettings.Unit as LengthUnit).Unit = LengthUnits.Inches;

 

WPF Diagram displays Ruler Unit

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied