RulerAnnotation
Ruler annotation.
Inherits: AnnotationBase
Constructors
public RulerAnnotation()
rulerAnnotation = RulerAnnotation()
Initializes a new instance of the AnnotationBase class.
Properties
public double RulerHeight { get; set; }
value = rulerAnnotation.RulerHeight
rulerAnnotation.RulerHeight = value
Ruler height.
public double RulerWidth { get; set; }
value = rulerAnnotation.RulerWidth
rulerAnnotation.RulerWidth = value
Ruler width.
public string Text1 { get; set; }
value = rulerAnnotation.Text1
rulerAnnotation.Text1 = value
First line of ruler text.
public string Text2 { get; set; }
value = rulerAnnotation.Text2
rulerAnnotation.Text2 = value
Second line of ruler text.
Methods
protected override void AttachInteractionHandlersTo(FrameworkElement source)
rulerAnnotation.AttachInteractionHandlersTo(source)
Auto-remove on any mouse click.
protected override void DetachInteractionHandlersFrom(FrameworkElement source)
rulerAnnotation.DetachInteractionHandlersFrom(source)
Auto-remove on any mouse click.
protected override IComparable FromCoordinate(double coord, IAxis axis)
result = rulerAnnotation.FromCoordinate(coord, axis)
Converts a pixel coordinate to data-value
- coord
- The pixel coordinate.
- axis
- The axis for which the data value is calculated
Returns: The datavalue
protected override IAnnotationPlacementStrategy GetCurrentPlacementStrategy()
result = rulerAnnotation.GetCurrentPlacementStrategy()
protected override Cursor GetSelectedCursor()
result = rulerAnnotation.GetSelectedCursor()
Gets the Cursor to use for the annotation when selected
public override bool IsPointWithinBounds(Point point)
result = rulerAnnotation.IsPointWithinBounds(point)
Returns true if the Point is within the bounds of the current IHitTestable element
- point
- The point to test
Returns: true if the Point is within the bounds
protected override void MakeInvisible()
rulerAnnotation.MakeInvisible()
Called internally by layout system when annotation is out of surface's bounds
protected override void MakeVisible(AnnotationCoordinates coordinates)
rulerAnnotation.MakeVisible(coordinates)
Called internally by layout system when annotation come into surface's bounds
public override void OnApplyTemplate()
rulerAnnotation.OnApplyTemplate()
Builds the visual tree for the LayoutTransformer control when a new template is applied.
Fields
public static readonly DependencyProperty RulerHeightProperty
value = RulerAnnotation.RulerHeightProperty
Ruler height.
public static readonly DependencyProperty RulerWidthProperty
value = RulerAnnotation.RulerWidthProperty
Ruler width.
public static readonly DependencyProperty Text1Property
value = RulerAnnotation.Text1Property
First line of ruler text.
public static readonly DependencyProperty Text2Property
value = RulerAnnotation.Text2Property
Second line of ruler text.