SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
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.
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};
Please login first to submit.