Hi,
I have a VerticalLineAnnotation that can be dragged over the chart by clicking and dragging on the line itself. (See attached image). The problem is, whenever I put the chart in front of a user, they try to drag by clicking on the label (the blue label with the time in the image).
How can I make this label draggable like the line?
Thanks.
- Robert Evans asked 9 years ago
- You must login to post comments
I found a solution – I create the AnnotationLabel in code and forward its mouse events to the VerticalLineAnnotation:
var line = new VerticalLineAnnotation();
var label = new AnnotationLabel {Cursor = Cursors.Hand};
label.MouseDown += (sender, args) => line.RaiseEvent(args);
label.MouseUp += (sender, args) => line.RaiseEvent(args);
label.MouseMove += (sender, args) => line.RaiseEvent(args);
line.AnnotationLabels = new ObservableCollection<AnnotationLabel> {label};
- Robert Evans answered 9 years ago
- You must login to post comments
Please login first to submit.