AxisMarkerAnnotation

StockSharp.Xaml.Charting.Visuals.Annotations

The AxisMarkerAnnotation provides an axis label which is data-bound to its Y-value. Used to place a marker on the Y-Axis it can give feedback about the latest value of a series, or important points in a series.

Inherits: AnchorPointAnnotation

Constructors

AxisMarkerAnnotation
public AxisMarkerAnnotation()
axisMarkerAnnotation = AxisMarkerAnnotation()

Initializes a new instance of the AxisMarkerAnnotation class.

Properties

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

Gets IAxis intance where AxisMarkerAnnotation is placed

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

Gets AxisInfo for current MarkerValue Used internally as DataContext for PointerTemplate and LabelTemplate

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

Gets or sets the Formatted Value of the Axis Marker. By default this is data-bound to Y1

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

Gets or sets label template of AxisMarkerAnnotation

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

Gets or sets the Marker tip width, this is the width of the point of the marker in pixels. Default value is 8. Change this property if the marker looks squashed!

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

Gets or sets pointer template of AxisMarkerAnnotation

Methods

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

Gets the Cursor to use for the annotation when selected

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

Returns true if the Point is within the bounds of the current IHitTestable element

point
The point to test

Returns: true if the Point is within the bounds

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

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

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

Virtual method to override if you wish to be notified that the AxisAlignment has changed

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

Converts a Data-Value to Pixel Coordinate

dataValue
The Data-Value to convert
canvasMeasurement
The size of the canvas in the X or Y direction
coordCalc
The current ICoordinateCalculatorCoordinate Calculator
direction
The X or Y direction for the transformation
Update
public override void Update(ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator)
axisMarkerAnnotation.Update(xCoordinateCalculator, yCoordinateCalculator)

Updates the coordinate calculators and refreshes the annotation position on the parent UltrachartSurface

xCoordinateCalculator
The XAxis ICoordinateCalculator
yCoordinateCalculator
The YAxis ICoordinateCalculator

Fields

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

Defines the AxisInfo DependencyProperty

FormattedValueProperty
public static readonly DependencyProperty FormattedValueProperty
value = AxisMarkerAnnotation.FormattedValueProperty

Defines the FormattedValue DependencyProperty

LabelTemplateProperty
public static readonly DependencyProperty LabelTemplateProperty
value = AxisMarkerAnnotation.LabelTemplateProperty

Defines the LabelTemplate DependencyProperty

MarkerPointWidthProperty
public static readonly DependencyProperty MarkerPointWidthProperty
value = AxisMarkerAnnotation.MarkerPointWidthProperty

Defines the MarkerPointWidth DependencyProperty

PointerTemplateProperty
public static readonly DependencyProperty PointerTemplateProperty
value = AxisMarkerAnnotation.PointerTemplateProperty

Defines the PointerTemplate DependencyProperty