AxisMarkerAnnotation

StockSharp.Xaml.Charting.Visuals.Annotations

AxisMarkerAnnotation 提供了一条轴标签,该标签的数据与它的Y值一致。它曾经在Y轴上放置了标记,可以反馈序列的最新值,或者序列中的重要点。

继承自: AnchorPointAnnotation

构造函数

AxisMarkerAnnotation
public AxisMarkerAnnotation()
axisMarkerAnnotation = AxisMarkerAnnotation()

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

属性

Axis
public IAxis Axis { get; }
value = axisMarkerAnnotation.Axis

得到IAKIS 的入驻位置 。

AxisInfo
public AxisInfo AxisInfo { get; private set; }
value = axisMarkerAnnotation.AxisInfo
axisMarkerAnnotation.AxisInfo = value

获取当前MarkerValue的DataContext 内部用作DataContext的PointerTemplate和LabelTemplate

FormattedValue
public string FormattedValue { get; set; }
value = axisMarkerAnnotation.FormattedValue
axisMarkerAnnotation.FormattedValue = value

获取或设置轴标记的格式值。 默认情况下, 它将数据绑定到 Y1

LabelTemplate
public DataTemplate LabelTemplate { get; set; }
value = axisMarkerAnnotation.LabelTemplate
axisMarkerAnnotation.LabelTemplate = value

获取或设置 AxisMarkerAnnotation 的标签模板

MarkerPointWidth
public double MarkerPointWidth { get; set; }
value = axisMarkerAnnotation.MarkerPointWidth
axisMarkerAnnotation.MarkerPointWidth = value

获取或设置标记的尖端宽度, 这是以像素表示的标记点的宽度 。 默认值为 8 。 如果标记看起来被压碎, 请更改此属性 !

PointerTemplate
public DataTemplate PointerTemplate { get; set; }
value = axisMarkerAnnotation.PointerTemplate
axisMarkerAnnotation.PointerTemplate = value

获取或设置%%% AxisMarkerAnnotation%%%%% 的指针模板

方法

GetSelectedCursor
protected override Cursor GetSelectedCursor()
result = axisMarkerAnnotation.GetSelectedCursor()

选择时获得光标用于注释

IsPointWithinBounds
public override bool IsPointWithinBounds(Point point)
result = axisMarkerAnnotation.IsPointWithinBounds(point)

如果点位于当前 IHitTestable 元素的边界内, 返回真值

point
测试点

返回值: 如果点在界限内, 则为真

OnApplyTemplate
public override void OnApplyTemplate()
axisMarkerAnnotation.OnApplyTemplate()

当在衍生类中被推翻时,每当应用程序代码或内部进程称为ApplyTemplate时,都会被引用.

OnAxisAlignmentChanged
protected override void OnAxisAlignmentChanged(IAxis axis, AxisAlignment oldAlignment)
axisMarkerAnnotation.OnAxisAlignmentChanged(axis, oldAlignment)

如果您想要被通知 AxisAlignment 已更改, 则使用虚拟方法覆盖

axis
oldAlignment
ToCoordinate
protected override double ToCoordinate(IComparable dataValue, double canvasMeasurement, ICoordinateCalculator<double> coordCalc, XyDirection direction)
result = axisMarkerAnnotation.ToCoordinate(dataValue, canvasMeasurement, coordCalc, direction)

将数据瓦等坐标转换为像素坐标

dataValue
要转换的数据值
canvasMeasurement
X 或 Y 方向的画布大小
coordCalc
The current ICoordinateCalculator
direction
X 或 Y 转换方向
Update
public override void Update(ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator)
axisMarkerAnnotation.Update(xCoordinateCalculator, yCoordinateCalculator)

更新坐标计算器,并刷新母机UltrachartSurface上的注释位置

xCoordinateCalculator
轴心国 ICoordinateCalculator
yCoordinateCalculator
The YAxis ICoordinateCalculator

字段

AxisInfoProperty
protected internal static readonly DependencyProperty AxisInfoProperty
value = AxisMarkerAnnotation.AxisInfoProperty

Defines the AxisInfo DependencyProperty

FormattedValueProperty
public static readonly DependencyProperty FormattedValueProperty
value = AxisMarkerAnnotation.FormattedValueProperty

定义 FormattedValue DependencyProperty 定义

LabelTemplateProperty
public static readonly DependencyProperty LabelTemplateProperty
value = AxisMarkerAnnotation.LabelTemplateProperty

定义 LabelTemplate DependencyProperty 定义

MarkerPointWidthProperty
public static readonly DependencyProperty MarkerPointWidthProperty
value = AxisMarkerAnnotation.MarkerPointWidthProperty

定义 MarkerPointWidth DependencyProperty 定义

PointerTemplateProperty
public static readonly DependencyProperty PointerTemplateProperty
value = AxisMarkerAnnotation.PointerTemplateProperty

定义 PointerTemplate DependencyProperty 定义