IAnnotation
Defines the interface to an annotation, a custom drawable element over or under the UltrachartSurface
Implements: IHitTestable, IPublishMouseEvents, IXmlSerializable
Properties
public object DataContext { get; set; }
value = iAnnotation.DataContext
iAnnotation.DataContext = value
Gets or sets the data context
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
public bool IsAttached { get; set; }
value = iAnnotation.IsAttached
iAnnotation.IsAttached = value
Gets or sets whether the current annotation is attached
public bool IsEditable { get; set; }
value = iAnnotation.IsEditable
iAnnotation.IsEditable = value
Gets or sets whether you can interact current annotation
public bool IsHidden { get; set; }
value = iAnnotation.IsHidden
iAnnotation.IsHidden = value
Gets or sets value, indicates whether current annotation was hidden by Hide call
public bool IsResizable { get; }
value = iAnnotation.IsResizable
Gets value, indicates whether current instance is resizable
public bool IsSelected { get; set; }
value = iAnnotation.IsSelected
iAnnotation.IsSelected = value
Gets or sets whether the current annotation is selected
public IUltrachartSurface ParentSurface { get; set; }
value = iAnnotation.ParentSurface
iAnnotation.ParentSurface = value
Gets or sets the parent IUltrachartSurface that this Annotation belongs to
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
public IServiceContainer Services { get; set; }
value = iAnnotation.Services
iAnnotation.Services = value
Gets or sets a IServiceContainer container
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.
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.
public IEnumerable<IAxis> XAxes { get; }
value = iAnnotation.XAxes
Returns the XAxes on the parent UltrachartSurface
public IAxis XAxis { get; }
value = iAnnotation.XAxis
Gets the XAxis IAxis instance on the parent UltrachartSurface
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
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
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
public IEnumerable<IAxis> YAxes { get; }
value = iAnnotation.YAxes
Returns the YAxes on the parent UltrachartSurface
public IAxis YAxis { get; }
value = iAnnotation.YAxis
Gets the primary YAxis, this is the first axis in the YAxes collection
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
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.
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
public void EndDrag()
iAnnotation.EndDrag()
Raises the DragEnded event, called when a drag operation ends
public Point[] GetBasePoints()
result = iAnnotation.GetBasePoints()
This method is used in internally by the AnnotationResizeAdorner. Gets the adorner point positions
public void Hide()
iAnnotation.Hide()
Hides the Annotation by removing adorner markers from the ParentSurface AdornerLayerCanvas and setting Visibility to Collapsed
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
public void OnAttached()
iAnnotation.OnAttached()
Called when the Annotation is attached to parent surface
public void OnDetached()
iAnnotation.OnDetached()
Called when the Annotation is detached from its parent surface
public void OnXAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
iAnnotation.OnXAxesCollectionChanged(sender, args)
Raises notification when parent XAxes changes.
public void OnYAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
iAnnotation.OnYAxesCollectionChanged(sender, args)
Raises notification when parent YAxes changes.
public bool Refresh()
result = iAnnotation.Refresh()
Refreshes the annnotation position on the parent UltrachartSurface, without causing a full redraw of the chart
public void ReleaseMouseCapture()
iAnnotation.ReleaseMouseCapture()
Releases mouse capture
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
public void StartDrag(bool isPrimary)
iAnnotation.StartDrag(isPrimary)
Raises the DragStarted event, called when a drag operation starts
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
public event EventHandler<AnnotationDragDeltaEventArgs> DragDelta
iAnnotation.DragDelta += handler
Occurs when current AnnotationBase is dragged or moved
public event EventHandler<AnnotationDragEventArgs> DragEnded
iAnnotation.DragEnded += handler
Occurs when a Drag or move operation ends
public event EventHandler<AnnotationDragEventArgs> DragStarted
iAnnotation.DragStarted += handler
Occurs when a Drag or move operation starts
public event EventHandler Selected
iAnnotation.Selected += handler
Occurs when IAnnotation becomes selected.
public event EventHandler Unselected
iAnnotation.Unselected += handler
Occurs when IAnnotation becomes unselected.