Pre loader

SciChart 5 WPF Annotation ForMvvm are broken

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 see I can’t choose version 5 from the drop down, is this version not released yet? Because I got an email saying otherwise months ago, please correct me if I shouldn’t use this version.

That been said, I downloaded version 5 from git and compiled it.
if I try to use something like this:

<s:HorizontalLineAnnotationForMvvm IsEditable="False" ShowLabel="False" Stroke="Green" StrokeThickness="2.0" Y1="2.0" IsHidden="False"/>

I get an exception in “LineAnnotationWithLabelsBase” function “MakeVisible” where it seems that “AnnotationLabels” is null and there is no check. I tried to fix the error and it kinda worked, but in doing so “IsHidden” just doesn’t work anymore, I even compared the code with the older version (4.2) and there is no difference in handling the visibility.
Find attached the code that shows the problem.

What is happening?

Thank you

Version
4.2.2.9777
Attachments
  • You must to post comments
0
0

It Worked, thanks!

  • You must to post comments
0
0

Hi Alessio

HorizontalLineAnnotationForMvvm is a class used internally by SciChart when you use the AnnotationsBinding Markup Extension to bind to a collection of Annotation ViewModels.

Your code should not use this class.

Please can you use HorizontalLineAnnotation instead, or, AnnotationsBinding as described in this article.

Let me know if that helps!

  • 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