Rulers

The Ruler provides a Horizontal and Vertical guide for measuring in the Diagram control. The Ruler can be used to measure the Diagram objects, indicate positions, and align Diagram elements. This is especially useful in creating scale models. You can set the unit of measure, such as centimeters or inches. The default Unit of measure is pixels.

Please refer to the sample from Dashboard->Desktop->WPF->Diagram->GettingStarted->Rulers and Units.

Define Rulers

diagramcontrol.HorizontalRuler = new Ruler();
diagramcontrol.VerticalRuler = new Ruler() { Orientation = Orientation.Vertical };
xmlns:Syncfusion="clr-namespace:Syncfusion.UI.Xaml.Diagram;assembly=Syncfusion.SfDiagram.WPF"
 xmlns:SyncControls="clr-namespace:Syncfusion.UI.Xaml.Diagram.Controls;assembly=Syncfusion.SfDiagram.WPF"

<Syncfusion:SfDiagram x:Name="diagramcontrol">
            <Syncfusion:SfDiagram.HorizontalRuler>
                <SyncControls:Ruler/>
            </Syncfusion:SfDiagram.HorizontalRuler>
            <Syncfusion:SfDiagram.VerticalRuler>
                <SyncControls:Ruler Orientation="Vertical"/>
            </Syncfusion:SfDiagram.VerticalRuler>
</Syncfusion:SfDiagram>

Customizing the Ruler

By default, ruler segments are arranged based on the MeasurementUnit. See the available LengthUnits for Ruler.

Segment width, the textual description of the ruler segment, and the appearance of the ruler ticks can be customized.

Please refer to the sample to Customize the Ruler