Pre loader

VerticalLineAnnotation selection

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, SciChart team.
Our users can add many VerticalLineAnnotations to chart. Also they need to know what annotation is active. It is usefull for annotation removing for example.

What way schould I use for change visual style for selected annotation. By default selected annotation do not differ with not selected.

At this time I am modify AddAdorners RemoveAdorners(I am use MyCustom Annotaion inherited from VerticalLineAnnotation). And use different colors. But names of theese methods confuse me.

May be it is good idea to add methods like MakeSelected and MakeUnselected. Documentation in chm file is not helpfull for this situation.

  • You must to post comments
0
0

Hi there,

You could use Triggers or Binding to achieve this, e.g.:

        <Style x:Key="VerticalLineAnnotationStyle" TargetType="s:VerticalLineAnnotation">
            <Setter Property="Stroke" Value="#FFFF6600" />
            <Setter Property="StrokeThickness" Value="2" />
            <Setter Property="ShowLabel" Value="True" />
            <Setter Property="LabelPlacement" Value="Axis" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Stroke" Value="Blue" />
                </Trigger>
            </Style.Triggers>
        </Style>

This can be done from code too. Please, let us know if this solution is suitable for you or if you need any assistance!

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
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