Search
Ruler Class
Remarks See Also
 






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

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 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
    Windows.UI.Xaml.DependencyObject
        Windows.UI.Xaml.UIElement
            Windows.UI.Xaml.FrameworkElement
                Windows.UI.Xaml.Controls.Panel
                    Windows.UI.Xaml.Controls.Grid
                        MindFusion.Diagramming.Ruler

 See Also