Pre loader

Example of subclassing VerticalLineAnnotation (or other Annotation classes)?

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


I have an application for which the VerticalLineAnnotation is a near perfect fit. However, to make it easier to add these annotations from the AnnotationCreatioinModifier, I would like to derive a new annotation class from VerticalLineAnnotation with a couple of new dependency properties, and new label style using these properties. Is this possible? I’ve looked through the forum and existing examples, and can’t find relevant examples. Can you point me in the right direction?


  • You must to post comments

Hi Bill,

If AnnotationCreationModifier is the problem, why not create a custom modifier?

It’s actually really easy to do this. You need some code to handle MouseDown, then place an annotation at the mouse point.

We have an example of something like this here: Add nearest Y value as annotation when click on chart.

There is also a set of documentation on custom modifiers API here: Custom Modifiers – ChartModifierBase API

Let me know if this helps,

Best regards,

  • You must to post comments

My actual request only used AnnotationCreationModifier as an example. I was actually asking if you had any examples of using one of the existing annotation classes (particularly VerticalLineAnnotation) as the base class for a new Annotation type.

What I would like to do is extend VerticalLineAnnotation, addind a couple of new dependency properties, and new label style that show these properties.

I could do a Custom Annotation, but I would essentially need to create a user control which duplicated the VerticalLineAnnotation – seems like overkill to me.

By the way, I am also looking at avoiding AnnotationCreationModifier per the example code in this discussion:


  • You must to post comments
Showing 2 results
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