AxisDragModifierBase

StockSharp.Xaml.Charting.ChartModifiers

Provides base class for dragging operations on axes

Inherits: ChartModifierBase

Constructors

AxisDragModifierBase
protected AxisDragModifierBase()
axisDragModifierBase = AxisDragModifierBase()

Initializes a new instance of the AxisDragModifierBase class.

Properties

AxisId
public string AxisId { get; set; }
value = axisDragModifierBase.AxisId
axisDragModifierBase.AxisId = value

Defines which YAxis to bind the YAxisDragModifier to, matching by string Id

DragMode
public AxisDragModes DragMode { get; set; }
value = axisDragModifierBase.DragMode
axisDragModifierBase.DragMode = value

Gets or sets the DragMode of the YAxisDragModifier. This modifier may be used to scale the VisibleRange or pan the VisibleRange creating a scrolling or vertical pan effect.

IsDragging
public bool IsDragging { get; protected set; }
value = axisDragModifierBase.IsDragging
axisDragModifierBase.IsDragging = value

Gets a value indicating whether the user is currently dragging the axis

MinTouchArea
public double MinTouchArea { get; set; }
value = axisDragModifierBase.MinTouchArea
axisDragModifierBase.MinTouchArea = value

Gets or sets minimal area of recognition (min height for horizontal axis or min width for vertical), where user click or touch triggers zoom behavior.

Methods

CalculateRelativeRange
protected virtual DoubleRange CalculateRelativeRange(IRange fromRange, IAxis axis)
result = axisDragModifierBase.CalculateRelativeRange(fromRange, axis)

When overriden in a derived class, calculates an output IRange to apply to the associated AxisBaseAxis, given the input parameters.

fromRange
The input range, expecting a VisibleRange
axis
The axis being operated on

Returns: The output IRange which can then be applied to the GrowBy property to get the same affect as applying the input visible-range

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

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

GetIsSecondHalf
protected virtual bool GetIsSecondHalf(Point point, Rect axisBounds, bool isHorizontalAxis)
result = axisDragModifierBase.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 virtual Cursor GetUsedCursor(IAxis axis)
result = axisDragModifierBase.GetUsedCursor(axis)

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

axis
The axis instance
OnAttached
public override void OnAttached()
axisDragModifierBase.OnAttached()

Called when the Chart Modifier is attached to the Chart Surface

OnDetached
public override void OnDetached()
axisDragModifierBase.OnDetached()

Called immediately before the Chart Modifier is detached from the Chart Surface

OnIsEnabledChanged
protected override void OnIsEnabledChanged()
axisDragModifierBase.OnIsEnabledChanged()

Called when the IsEnabled property changes on this ChartModifierBase instance

OnModifierMouseDown
public override void OnModifierMouseDown(ModifierMouseArgs e)
axisDragModifierBase.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)
axisDragModifierBase.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)
axisDragModifierBase.OnModifierMouseUp(e)

Called when a Mouse Button is released on the parent UltrachartSurface

e
Arguments detailing the mouse button operation
PerformPan
protected abstract void PerformPan(Point currentPoint, Point lastPoint)
axisDragModifierBase.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
PerformScale
protected virtual void PerformScale(Point currentPoint, Point lastPoint, bool isSecondHalf)
axisDragModifierBase.PerformScale(currentPoint, lastPoint, isSecondHalf)

Performs a Scale on the associated AxisBase. The scale is considered to be a drag from to

currentPoint
The current mouse point
lastPoint
The last mouse point
isSecondHalf
Boolean flag to determine which side of the axis is scaled
SetAxisCursor
private void SetAxisCursor(Cursor cursor)
axisDragModifierBase.SetAxisCursor(cursor)

Sets passed cursor on current axis, or default cursor returned by IAxis)

Fields

AxisIdProperty
private static readonly DependencyProperty AxisIdProperty
value = AxisDragModifierBase.AxisIdProperty

Defines the YAxisId DependencyProperty

DragModeProperty
public static readonly DependencyProperty DragModeProperty
value = AxisDragModifierBase.DragModeProperty

Defines the DragMode DependencyProperty

MinTouchAreaProperty
public static readonly DependencyProperty MinTouchAreaProperty
value = AxisDragModifierBase.MinTouchAreaProperty

Defines the MinTouchArea DependencyProperty