Pre loader

Restrict Drag of Vertical Annotation between an x axis range

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

hi,
I have a vertical annotation and I want to restrict the scrolling of annotation between an x axis range.

ie, When I drag and reach left most point, it should not move beyond that point. Same should happen when I reach right most point.

How can I do that?

  • You must to post comments
0
0

Hi Vibin,

A strategy for you is to subscribe to the VerticalLineAnnotation.DragDelta event and if X1 < xMin or X1 > xMax set X1 back to the edge value.

If you are doing this in MVVM you can simply bind TwoWay from VerticalLineAnnotation.X1 to a property in your ViewModel and clip the movement in the same way.

hope this helps!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies