Found one solution without changing original source.
made an new annotation that inherits from arrow annotation, and override mouse even in "new annotation" class.
In this way, don't need to use external tool class to modify annotation's properties.
made an new annotation that inherits from arrow annotation, and override mouse even in "new annotation" class.
In this way, don't need to use external tool class to modify annotation's properties.
publicclass SelectableArrowAnnotation:ArrowAnnotation { // any better name? DataPoint lastPoint = DataPoint.Undefined; bool moveStartPoint = false; bool moveEndPoint = false; OxyColor originalColor = OxyColors.White; protectedoverridevoid OnMouseDown(object sender, OxyPlot.OxyMouseEventArgs e) { if (e.ChangedButton != OxyMouseButton.Left) { return; } lastPoint = this.InverseTransform(e.Position); moveStartPoint = e.HitTestResult.Index != 2; moveEndPoint = e.HitTestResult.Index != 1; originalColor = this.Color; this.Color = OxyColors.Red; var model = this.PlotModel; model.InvalidatePlot(false); e.Handled = true; } protectedoverridevoid OnMouseMove(object sender, OxyPlot.OxyMouseEventArgs e) { var thisPoint = this.InverseTransform(e.Position); double dx = thisPoint.X - lastPoint.X; double dy = thisPoint.Y - lastPoint.Y; if (moveStartPoint) { this.StartPoint = new DataPoint(this.StartPoint.X + dx, this.StartPoint.Y + dy); } if (moveEndPoint) { this.EndPoint = new DataPoint(this.EndPoint.X + dx, this.EndPoint.Y + dy); } lastPoint = thisPoint; var model = this.PlotModel; model.InvalidatePlot(false); e.Handled = true; } protectedoverridevoid OnMouseUp(object sender, OxyPlot.OxyMouseEventArgs e) { this.Color = originalColor; } }