YAxisDragModifier

StockSharp.Xaml.Charting.ChartModifiers

The YAxisDragModifier provides a mouse drag to scale the Y-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

Methods

CalculateScaledRange
protected override IRange CalculateScaledRange(Point currentPoint, Point lastPoint, bool isSecondHalf, IAxis axis)
result = yAxisDragModifier.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

GetCurrentAxis
protected override IAxis GetCurrentAxis()
result = yAxisDragModifier.GetCurrentAxis()

Gets the IAxis instance, which current modifier is associated with, on the parent UltrachartSurface

GetIsSecondHalf
protected override bool GetIsSecondHalf(Point point, Rect axisBounds, bool isHorizontalAxis)
result = yAxisDragModifier.GetIsSecondHalf(point, axisBounds, isHorizontalAxis)

Gets whether the specified mouse point is within the second (right-most or top-most) half of the Axis bounds

point
The mouse point
axisBounds
The axis bounds
isHorizontalAxis
Value, which indicates whether current axis is horizontal or not

Returns: True if the point is within the second (right-most or top-most) half of the axis bounds, else false

GetUsedCursor
protected override Cursor GetUsedCursor(IAxis axis)
result = yAxisDragModifier.GetUsedCursor(axis)

Depending on axis orientation and AxisAlignment, returns a Cursor to show during mouse-over of the axis

axis
The axis instance
OnModifierMouseDown
public override void OnModifierMouseDown(ModifierMouseArgs e)
yAxisDragModifier.OnModifierMouseDown(e)

Called when a Mouse Button is pressed on the parent UltrachartSurface

e
Arguments detailing the mouse button operation
OnModifierMouseMove
public override void OnModifierMouseMove(ModifierMouseArgs e)
yAxisDragModifier.OnModifierMouseMove(e)

Called when the Mouse is moved on the parent UltrachartSurface

e
Arguments detailing the mouse move operation
OnModifierMouseUp
public override void OnModifierMouseUp(ModifierMouseArgs e)
yAxisDragModifier.OnModifierMouseUp(e)

Called when a Mouse Button is released on the parent UltrachartSurface

e
Arguments detailing the mouse button operation
PerformPan
protected override void PerformPan(Point currentPoint, Point lastPoint)
yAxisDragModifier.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