AxisDragModifierBase

StockSharp.Xaml.Charting.ChartModifiers

为拖动轴上的操作提供基础类

继承自: ChartModifierBase

构造函数

AxisDragModifierBase
protected AxisDragModifierBase()
axisDragModifierBase = AxisDragModifierBase()

初始化了 & ##AxisDragModifierBase+# 类的新实例 。

属性

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

定义将 YAxisDragModifier 绑定在哪个 YAXis 上, 以字符串 Id 匹配

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

获取或设置 YAxisDragModifier 的 DragMode 。 此修改器可用于缩放 VisibleRange 或将 VisibleRange 填平, 从而创建滚动或垂直的平板效果 。

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

获得一个显示用户是否正在拖动轴的值

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

获得或设置最小识别区域(水平轴的最小高度或垂直的最小宽度),用户点击或触摸会放大行为.

方法

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

当在衍生类中被覆盖时,会计算输出 IRang 适用于关联的 AxisBase, 同时考虑到输入参数.

fromRange
输入范围, 需要 VisibleRange
axis
运行在轴上

返回值: 然后可以应用到 GrowBy 属性的输出 IRang 以获得与应用输入可视距离相同的影响

CalculateScaledRange
protected abstract IRange CalculateScaledRange(Point currentPoint, Point lastPoint, bool isSecondHalf, IAxis axis)
result = axisDragModifierBase.CalculateScaledRange(currentPoint, lastPoint, isSecondHalf, axis)

当在衍生类中被覆盖时, 计算输出 IRang 适用于关联的 AxisBase, 同时考虑到输入参数

currentPoint
当前鼠标位置
lastPoint
鼠标最后一个位置
isSecondHalf
确定比例尺操作方式的旗,% e.g%%%%。 轴线的上下、 左下或右上被拖动了一半 。
axis
运行在轴上

返回值: 输出 IRANG

GetCurrentAxis
protected abstract IAxis GetCurrentAxis()
result = axisDragModifierBase.GetCurrentAxis()

获取当前修改符与之相关的IAxis实例, 位于父 UltrachartSurface

GetIsSecondHalf
protected virtual bool GetIsSecondHalf(Point point, Rect axisBounds, bool isHorizontalAxis)
result = axisDragModifierBase.GetIsSecondHalf(point, axisBounds, isHorizontalAxis)

获取指定的鼠标点是否在轴线的第二( 右下方或上方) 一半 以内

point
鼠标点
axisBounds
轴线
isHorizontalAxis
值,表示当前轴是否水平

返回值: 如果点在轴线的第二( 右下方或上方) 一半 以内, 否则是虚假的

GetUsedCursor
protected virtual Cursor GetUsedCursor(IAxis axis)
result = axisDragModifierBase.GetUsedCursor(axis)

根据轴方向,返回鼠标在轴上翻转时显示的光标

axis
轴实例
OnAttached
public override void OnAttached()
axisDragModifierBase.OnAttached()

图表修饰符附在图表表面时调用

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

在图修饰器脱离图面之前立即调用

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

当 & ###IsEnabled### 属性在此 & ##ChartModifierBase#% 实例上更改时调用

OnModifierMouseDown
public override void OnModifierMouseDown(ModifierMouseArgs e)
axisDragModifierBase.OnModifierMouseDown(e)

当鼠标按钮被按在父的上时调用 {}UltrachartSurface}

e
详述鼠标按钮操作的参数
OnModifierMouseMove
public override void OnModifierMouseMove(ModifierMouseArgs e)
axisDragModifierBase.OnModifierMouseMove(e)

当鼠标移动到父 UltrachartSurface 上时调用

e
详述鼠标移动操作的参数
OnModifierMouseUp
public override void OnModifierMouseUp(ModifierMouseArgs e)
axisDragModifierBase.OnModifierMouseUp(e)

当鼠标按钮在父机上发布时调用 {}UltrachartSurface}

e
详述鼠标按钮操作的参数
PerformPan
protected abstract void PerformPan(Point currentPoint, Point lastPoint)
axisDragModifierBase.PerformPan(currentPoint, lastPoint)

将一个平板纸放在被吸附的AxisBase上。平板纸被认为是从一个拖到另一个拖动

currentPoint
当前鼠标点
lastPoint
鼠标最后一点
PerformScale
protected virtual void PerformScale(Point currentPoint, Point lastPoint, bool isSecondHalf)
axisDragModifierBase.PerformScale(currentPoint, lastPoint, isSecondHalf)

在关联的 AxisBase 上执行一个缩放。 缩放被认为是从拖到拖放

currentPoint
当前鼠标点
lastPoint
鼠标最后一点
isSecondHalf
用于确定轴向哪一面的布尔旗
SetAxisCursor
private void SetAxisCursor(Cursor cursor)
axisDragModifierBase.SetAxisCursor(cursor)

设置当前轴上通过光标, 或 IAxis 返回的默认光标)

字段

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

定义 MinTouchArea DependencyProperty 定义