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


Hi there,

In the application we are developing, a user has the ability to add his/her own text annotation to the chart. Its simply done on the code behind, as its not persisted, so its really simple.

The code we use to add the user text annotation is:

    private void AddTextAnnotationExecute(object obj)
        var yValue = YAxis.HitTest(MousePoint);
        var xValue = XAxis.HitTest(MousePoint);

        var textAnnotation = new TextAnnotation
            CanEditText = true,
            IsEditable = true,
            IsEnabled = true,
            Text = xValue.DataValue.ToString(),
            X1 = xValue.DataValue,
            Y1 = yValue.DataValue,
            YAxisId = YAxis.Id,
            Uid = Guid.NewGuid().ToString(),                


        foreach (var annotation in _sciChartSurface.Annotations.Cast<AnnotationBase>().Where(c => !string.IsNullOrEmpty(c.Uid)))
            annotation.IsEditable = true;


This is the style we apply to the text annotation:

<Style TargetType="sciChart:TextAnnotation">
        <Setter Property="BorderBrush" Value="Gray"/>
        <Setter Property="Background" Value="White"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="FontFamily" Value="Segoe UI"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="AnnotationCanvas" Value="AboveChart"/>

So as you can see its pretty straight forward, but this is where is gets weird, this functionality works perfectly on computers on which Visual Studio is installed on, but on other computers, the text annotation is selectable and moveable, but no amount of double clicking enables the annotation for editing. I tried forcing the textbox IsEnabled=”True”, but to no avail.

Any suggestions?

Thanks in advance

  • You must to post comments

Hi Chuck,

Have you also set TextAnnotation.CanEditText?

If you need to send over a full code sample so we can investigate, please email it to support.

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.