Pre loader

Keyboard shortcuts to enable AnnotationCreationModifier

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


Hi, there.

Our users want CreateAnnotationModifier be active while Control button is pressed. Also they want to delete selected annotation with delete button.

I add handlers for


When control capture mouse it can do not recieve focus, thereby button events do not handle.
I am not sure but when control has focus it can not handle button events too.

Chart start handle button events when I am select annotation and click on chart after it.

It is impossible to manually call Focus(), because application has other controls.

When I am delete or add annotation chart loss and recieve focus many times.

Is this correct behaviour?

What additional information do you need for fixing this issue?

  • You must to post comments

Hi Kiril,

there is built-in way to achieve that with modifiers. You need to extend existing AnnotationCreationModifier, and check ModifierMouseArgs.Modifier for keyboards modifiers:

    public class AnnotationCreationModifierEx: AnnotationCreationModifier
        public override void OnModifierMouseUp(ModifierMouseArgs mouseButtonEventArgs)
            if (
                //checks for the first point
                (mouseButtonEventArgs.Modifier == MouseModifier.Ctrl && (Annotation == null || Annotation.IsSelected)) ||
                //checks for the second point
                (Annotation != null && !Annotation.IsSelected))

                //fix for another issue, which appears if Y axis is left-aligned,
                //you may omit it
                var translatedPoint = GetPointRelativeTo(mouseButtonEventArgs.MousePoint, ModifierSurface);
                mouseButtonEventArgs.MousePoint = translatedPoint;

                //call base implementation

Please, try the above and give us any feedback.

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.