XAxisDragModifier
The XAxisDragModifier provides a mouse drag to scale the X-Axis. This behaviour scales the axis in a different direction depending on which half of the axis the user starts the operation in Add to a UltrachartSurface and set IsEnabled to true to enable this behaviour
Inherits: AxisDragModifierBase
Constructors
public XAxisDragModifier()
xAxisDragModifier = XAxisDragModifier()
Initializes a new instance of the XAxisDragModifier class.
Properties
public ClipMode ClipModeX { get; set; }
value = xAxisDragModifier.ClipModeX
xAxisDragModifier.ClipModeX = value
Defines how panning behaves when you reach the edge of the X-Axis extents. e.g. ClipMode.ClipAtExtents prevents panning outside of the X-Axis, ClipMode.None allows panning outside
Methods
protected override IRange CalculateScaledRange(Point currentPoint, Point lastPoint, bool isSecondHalf, IAxis axis)
result = xAxisDragModifier.CalculateScaledRange(currentPoint, lastPoint, isSecondHalf, axis)
When overriden in a derived class, calculates an output IRange to apply to the associated AxisBaseAxis, given the input parameters
- currentPoint
- The current mouse position
- lastPoint
- The last mouse position
- isSecondHalf
- A flag, which determines how the scale operates, e.g. which half of the axis (top or bottom, left or right) was dragged
- axis
- The axis being operated on
Returns: The output IRange
protected override IAxis GetCurrentAxis()
result = xAxisDragModifier.GetCurrentAxis()
Gets the IAxis instance, which current modifier is associated with, on the parent UltrachartSurface
public override void OnModifierMouseDown(ModifierMouseArgs e)
xAxisDragModifier.OnModifierMouseDown(e)
Called when a Mouse Button is pressed on the parent UltrachartSurface
- e
- Arguments detailing the mouse button operation
public override void OnModifierMouseUp(ModifierMouseArgs e)
xAxisDragModifier.OnModifierMouseUp(e)
Called when a Mouse Button is released on the parent UltrachartSurface
- e
- Arguments detailing the mouse button operation
protected override void PerformPan(Point currentPoint, Point lastPoint)
xAxisDragModifier.PerformPan(currentPoint, lastPoint)
Peforms a pan on the assocaited AxisBase. The pan is considered to be a drag from to
- currentPoint
- The current mouse point
- lastPoint
- The last mouse point
Fields
public static readonly DependencyProperty ClipModeXProperty
value = XAxisDragModifier.ClipModeXProperty
Defines the ClipToExtentsX Dependency Property