The Ruler control provides horizontal and vertical scales that help users measure diagram items.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming.Silverlight
C#
![]() |
---|
public class Ruler : Grid |
Visual Basic
![]() |
---|
Public Class Ruler |
To set which Diagram instance is shown in a ruler, add it as a child to the Ruler element by placing the <Diagram> tags within the <Ruler> tags in XAML. Note that the Ruler contains an internal ScrollViewer, so you should not add an additional viewer to enable scrolling.
The ruler tracks mouse movements and modifications being performed on an item, and displays markers over the scales indicating the current position in diagram's coordinate system. The colors of these markers can be changed using the PointerColor and ProjectionColor properties.
The ruler allows aligning several items by clicking on a scale and dragging. That displays alignment guides which follow the mouse pointer and move all selected items on their way. If no diagram elements are selected, all items are moved.
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Panel
System.Windows.Controls.Grid
MindFusion.Diagramming.Ruler