SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.


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.