I am trying to make a movable custom annotation for a graph. I get the 'arrow-cross' for moving the annotation when hoovering above it but i cant actually move the annotation. Thats how my code looks like:

public partial class Calibration : CustomAnnotation
        public Calibration()
            this.IsResizable = false;
            this.DragDirections = SciChart.Charting.XyDirection.XYDirection;
            this.IsEditable = true;
            this.HorizontalAnchorPoint = HorizontalAnchorPoint.Left;
            this.VerticalAnchorPoint = VerticalAnchorPoint.Bottom;
            this.CoordinateMode = AnnotationCoordinateMode.Relative;

            this.X1 = 0.1;
            this.Y1 = 0.9;

What i want as final result is a custom annotation that is inially displayed at the bottom left corner (that works) and can be moved using the mouse. So that the user can position it anywhere on the graph. Any suggestions what is missing to make the annotation movable?

1 Answers

Dr. ABT On

To make a CustomAnnotation editable in SciChart WPF, you only need to set Annotation.IsEditable = true.

It should 'just work'

Check out the example on the SciChart Website called 'Create Annotations Dynamically'.

enter image description here

In this example, click the Annotation icon on the left, select 'MyCustomAnnotation' and click 'Add Annotation'. This will add a CustomAnnotation to the chart, which you should be able to click, edit and move.

Finally, the source code for the above example is here.