DiagramLite Programmer's Guide
Ruler Class
Remarks See Also
 





The Ruler control provides horizontal and vertical scales that help users measure diagram items.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming.Silverlight

 Syntax

C#  Copy Code

public class Ruler : Grid

Visual Basic  Copy Code

Public Class Ruler
    Inherits Grid

 Remarks

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.

 Inheritance Hierarchy

System.Object
    System.Windows.DependencyObject
        System.Windows.UIElement
            System.Windows.FrameworkElement
                System.Windows.Controls.Panel
                    System.Windows.Controls.Grid
                        MindFusion.Diagramming.Ruler

 See Also

Ruler Members
MindFusion.Diagramming Namespace