IAnnotation

StockSharp.Xaml.Charting.Visuals.Annotations

Defines the interface to an annotation, a custom drawable element over or under the UltrachartSurface

Implements: IHitTestable, IPublishMouseEvents, IXmlSerializable

Properties

DataContext
public object DataContext { get; set; }
value = iAnnotation.DataContext
iAnnotation.DataContext = value

Gets or sets the data context

DragDirections
public XyDirection DragDirections { get; set; }
value = iAnnotation.DragDirections
iAnnotation.DragDirections = value

Limits the Drag direction when dragging the annotation using the mouse, e.g in the X-Direction, Y-Direction or XyDirection. See the XyDirection enumeration for options

IsAttached
public bool IsAttached { get; set; }
value = iAnnotation.IsAttached
iAnnotation.IsAttached = value

Gets or sets whether the current annotation is attached

IsEditable
public bool IsEditable { get; set; }
value = iAnnotation.IsEditable
iAnnotation.IsEditable = value

Gets or sets whether you can interact current annotation

IsHidden
public bool IsHidden { get; set; }
value = iAnnotation.IsHidden
iAnnotation.IsHidden = value

Gets or sets value, indicates whether current annotation was hidden by Hide call

IsResizable
public bool IsResizable { get; }
value = iAnnotation.IsResizable

Gets value, indicates whether current instance is resizable

IsSelected
public bool IsSelected { get; set; }
value = iAnnotation.IsSelected
iAnnotation.IsSelected = value

Gets or sets whether the current annotation is selected

ParentSurface
public IUltrachartSurface ParentSurface { get; set; }
value = iAnnotation.ParentSurface
iAnnotation.ParentSurface = value

Gets or sets the parent IUltrachartSurface that this Annotation belongs to

ResizeDirections
public XyDirection ResizeDirections { get; set; }
value = iAnnotation.ResizeDirections
iAnnotation.ResizeDirections = value

Limits the Resize direction when resiaing the annotation using the mouse, e.g in the X-Direction, Y-Direction or XyDirection. See the XyDirection enumeration for options

Services
public IServiceContainer Services { get; set; }
value = iAnnotation.Services
iAnnotation.Services = value

Gets or sets a IServiceContainer container

X1
public IComparable X1 { get; set; }
value = iAnnotation.X1
iAnnotation.X1 = value

Gets or sets the X1 Coordinate of the Annotation. For Absolute, this must be a data-value on the X-Axis such as a DateTime for DateTimeAxis, double for NumericAxis or integer index for CategoryDateTimeAxis. For Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the far left of the XAxis and 1.0 is the far right.

X2
public IComparable X2 { get; set; }
value = iAnnotation.X2
iAnnotation.X2 = value

Gets or sets the X2 Coordinate of the Annotation. For Absolute, this must be a data-value on the X-Axis such as a DateTime for DateTimeAxis, double for NumericAxis or integer index for CategoryDateTimeAxis. For Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the far left of the XAxis and 1.0 is the far right.

XAxes
public IEnumerable<IAxis> XAxes { get; }
value = iAnnotation.XAxes

Returns the XAxes on the parent UltrachartSurface

XAxis
public IAxis XAxis { get; }
value = iAnnotation.XAxis

Gets the XAxis IAxis instance on the parent UltrachartSurface

XAxisId
public string XAxisId { get; set; }
value = iAnnotation.XAxisId
iAnnotation.XAxisId = value

Gets or sets the XAxis Id that this annotation is measured against. See Id

Y1
public IComparable Y1 { get; set; }
value = iAnnotation.Y1
iAnnotation.Y1 = value

Gets or sets the Y1 Coordinate of the Annotation. For Absolute, this must be a data-value on the Y-Axis such as a double for NumericAxis For Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the bottom of the YAxis and 1.0 is the top

Y2
public IComparable Y2 { get; set; }
value = iAnnotation.Y2
iAnnotation.Y2 = value

Gets or sets the Y2 Coordinate of the Annotation. For Absolute, this must be a data-value on the Y-Axis such as a double for NumericAxis For Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the bottom of the YAxis and 1.0 is the top

YAxes
public IEnumerable<IAxis> YAxes { get; }
value = iAnnotation.YAxes

Returns the YAxes on the parent UltrachartSurface

YAxis
public IAxis YAxis { get; }
value = iAnnotation.YAxis

Gets the primary YAxis, this is the first axis in the YAxes collection

YAxisId
public string YAxisId { get; set; }
value = iAnnotation.YAxisId
iAnnotation.YAxisId = value

Gets or sets the YAxis Id that this annotation is measured against. See Id

Methods

CanMultiSelect
public bool CanMultiSelect(IAnnotation[] annotations)
result = iAnnotation.CanMultiSelect(annotations)

Check if this annotation can be multiselected along with other annotations.

annotations
Annotations to check against.
CaptureMouse
public bool CaptureMouse()
result = iAnnotation.CaptureMouse()

Captures the mouse

Drag
public void Drag(double hOffset, double vOffset)
iAnnotation.Drag(hOffset, vOffset)

Raises the DragDelta event, called when a drag operation is in progress and each time the X1 Y1 X2 Y2 points update in the annotation

EndDrag
public void EndDrag()
iAnnotation.EndDrag()

Raises the DragEnded event, called when a drag operation ends

GetBasePoints
public Point[] GetBasePoints()
result = iAnnotation.GetBasePoints()

This method is used in internally by the AnnotationResizeAdorner. Gets the adorner point positions

Hide
public void Hide()
iAnnotation.Hide()

Hides the Annotation by removing adorner markers from the ParentSurface AdornerLayerCanvas and setting Visibility to Collapsed

MoveAnnotation
public void MoveAnnotation(double offsetX, double offsetY)
iAnnotation.MoveAnnotation(offsetX, offsetY)

This method is used internally by the AnnotationDragAdorner. Programmatically moves the annotation by an X,Y offset.

offsetX
offsetY
OnAttached
public void OnAttached()
iAnnotation.OnAttached()

Called when the Annotation is attached to parent surface

OnDetached
public void OnDetached()
iAnnotation.OnDetached()

Called when the Annotation is detached from its parent surface

OnXAxesCollectionChanged
public void OnXAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
iAnnotation.OnXAxesCollectionChanged(sender, args)

Raises notification when parent XAxes changes.

OnYAxesCollectionChanged
public void OnYAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
iAnnotation.OnYAxesCollectionChanged(sender, args)

Raises notification when parent YAxes changes.

Refresh
public bool Refresh()
result = iAnnotation.Refresh()

Refreshes the annnotation position on the parent UltrachartSurface, without causing a full redraw of the chart

ReleaseMouseCapture
public void ReleaseMouseCapture()
iAnnotation.ReleaseMouseCapture()

Releases mouse capture

SetBasePoint
public void SetBasePoint(Point newPoint, int index)
iAnnotation.SetBasePoint(newPoint, index)

This method is used in internally by the AnnotationResizeAdorner. Programmatically sets an adorner point position

newPoint
index
Show
public void Show()
iAnnotation.Show()

Shows annotation which being hidden by Hide call

StartDrag
public void StartDrag(bool isPrimary)
iAnnotation.StartDrag(isPrimary)

Raises the DragStarted event, called when a drag operation starts

Update
public void Update(ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator)
iAnnotation.Update(xCoordinateCalculator, yCoordinateCalculator)

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

xCoordinateCalculator
The XAxis ICoordinateCalculator
yCoordinateCalculator
The YAxis ICoordinateCalculator

Events

DragDelta
public event EventHandler<AnnotationDragDeltaEventArgs> DragDelta
iAnnotation.DragDelta += handler

Occurs when current AnnotationBase is dragged or moved

DragEnded
public event EventHandler<AnnotationDragEventArgs> DragEnded
iAnnotation.DragEnded += handler

Occurs when a Drag or move operation ends

DragStarted
public event EventHandler<AnnotationDragEventArgs> DragStarted
iAnnotation.DragStarted += handler

Occurs when a Drag or move operation starts

Selected
public event EventHandler Selected
iAnnotation.Selected += handler

Occurs when IAnnotation becomes selected.

Unselected
public event EventHandler Unselected
iAnnotation.Unselected += handler

Occurs when IAnnotation becomes unselected.