Pre loader

Annotations visibility

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

Answered
1
0

Hallo,

I have some annotations wich i want to collapse/hide. Whenever i doubleclick/use zoomextends on the chartsurface any hidden annotation is made visible again. I found out that this will not happen if i dont use zoomextends. I gues this is a bug or is it normal behaivour? Can i override this behaivour?

  • You must to post comments
Best Answer
1
0

The AnnotationBase class uses Visibility internally to bring the annotation out of the Visual Tree in a performant manner (we found that removing/adding an annotation to a canvas was an expensive operation, so far quicker to hide it using Visibility.Collapsed when the Annotation was outside of the viewport, for instance), allowing us to achieve fast virtualisation of annotations.

So, we realise its counter intuitive but there was a good reason to making the API this way. To allow you to data bind to annotation visibility, we added the IsHidden property:

// Inside AnnotationBase.cs

/// 
/// Gets or sets value, indicates whether current annotation was hidden by  call
/// 
public bool IsHidden
{
    get { return (bool)GetValue(IsHiddenProperty); }
    set { SetValue(IsHiddenProperty, value); }
}

If you set this value, or data bind to it, you can hide an annotation which is inside the viewport.

Best regards,
Andrew

  • You must to post comments
0
0

Nevermind, I found out that i should use the “isHidden” property.

  • 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