AnnotationCollection

StockSharp.Xaml.Charting.Visuals.Annotations

Contains a collection of IAnnotation derived types, which allow custom drawing elements over or under the parent UltrachartSurface

Inherits: ObservableCollection<IAnnotation>

Implements: IXmlSerializable

Constructors

AnnotationCollection
public AnnotationCollection()
annotationCollection = AnnotationCollection()

Initializes a new instance of the AnnotationCollection class.

AnnotationCollection
public AnnotationCollection(IEnumerable<IAnnotation> collection)
annotationCollection = AnnotationCollection(collection)

Initializes a new instance of the AnnotationCollection class.

Properties

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

Gets or sets the parent UltrachartSurface to perform operations on

Methods

ClearItems
protected override void ClearItems()
annotationCollection.ClearItems()

Clears all Annotations from the parent UltrachartSurface

DeselectAll
public void DeselectAll()
annotationCollection.DeselectAll()

Deselects all annotations in the AnnotationCollection

GetSchema
public XmlSchema GetSchema()
result = annotationCollection.GetSchema()

Returns an XmlSchema that describes the XML representation of the object that is produced by the WriteXml method and consumed by the ReadXml method

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

Called with the XAxesAxisCollection changes

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

Called with the YAxesAxisCollection changes

ReadXml
public void ReadXml(XmlReader reader)
annotationCollection.ReadXml(reader)

Generates AnnotationCollection from its XML representation.

reader
RefreshPositions
public void RefreshPositions(RenderPassInfo rpi)
annotationCollection.RefreshPositions(rpi)

Refreshes positions of all annotations within the collection

rpi
SubscribeSurfaceEvents
public void SubscribeSurfaceEvents(IUltrachartSurface parentSurface)
annotationCollection.SubscribeSurfaceEvents(parentSurface)

Subscribes the AnnotationCollection to events on the parent UltrachartSurface. Should be called internally by the Annotations API when attaching to a surface.

parentSurface
The parent UltrachartSurface
TrySelectAnnotation
public bool TrySelectAnnotation(IAnnotation annotationBase)
result = annotationCollection.TrySelectAnnotation(annotationBase)

Gets attempt to select annotation, and returns whether attempt was successful or not

annotationBase
Annotation IAnnotation for selection
UnsubscribeSurfaceEvents
public void UnsubscribeSurfaceEvents(IUltrachartSurface parentSurface)
annotationCollection.UnsubscribeSurfaceEvents(parentSurface)

Unsubscribes the AnnotationCollection to events on the parent UltrachartSurface. Should be called internally by the Annotations API when detaching from a surface.

parentSurface
The parent UltrachartSurface
WriteXml
public void WriteXml(XmlWriter writer)
annotationCollection.WriteXml(writer)

Converts AnnotationCollection into its XML representation.

writer