Pre loader

Binding to PointMetada

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

How can I bind to pointmedata ?

 <s:FastLineRenderableSeries  YAxisId="Ch0"
                                        DataSeries="{Binding DataSeries[Marker]}" Stroke="Transparent"
                                        AntiAliasing="False" ResamplingMode="None"  >
                <s:FastLineRenderableSeries.PointMarker>
                    <s:SpritePointMarker>
                        <s:SpritePointMarker.PointMarkerTemplate>
                            <ControlTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Test" Foreground="White"/>
                                    <s:CustomAnnotation >
                                        <s:CustomAnnotation.Style>
                                            <Style TargetType="s:CustomAnnotation">
                                                <Setter Property="Content">
                                                    <Setter.Value>
                                                        <Border x:Name="Border" BorderBrush="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=s:FastLineRenderableSeries},Path=MarkerAnnotationViewModel.BorderBrush}" BorderThickness="1" Width="11"
                        Height="11" Margin="-5,-5,0,0" CornerRadius="1"
                        Background="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=s:FastLineRenderableSeries},Path= PointMetadata.MarkerAnnotationViewModel.Background}">
                                                            <Border.Style>
                                                                <Style TargetType="Border">
                                                                    <Style.Triggers>
                                                                        <DataTrigger Binding="{Binding CanChange, UpdateSourceTrigger=PropertyChanged}"
                                             Value="True">
                                                                            <DataTrigger.EnterActions>
                                                                                <BeginStoryboard>
                                                                                    <Storyboard>
                                                                                        <DoubleAnimation Storyboard.TargetProperty="(Border.Opacity)"
                                                                 From="1" To="0" Duration="0:0:0.75"
                                                                 AutoReverse="True" RepeatBehavior="5x" />
                                                                                    </Storyboard>
                                                                                </BeginStoryboard>
                                                                            </DataTrigger.EnterActions>
                                                                            <DataTrigger.ExitActions>
                                                                                <BeginStoryboard>
                                                                                    <Storyboard>
                                                                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0"
                                                                 Duration="0:0:0" />
                                                                                    </Storyboard>
                                                                                </BeginStoryboard>
                                                                            </DataTrigger.ExitActions>
                                                                        </DataTrigger>
                                                                    </Style.Triggers>
                                                                </Style>
                                                            </Border.Style>
                                                        </Border>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </s:CustomAnnotation.Style>
                                    </s:CustomAnnotation>
                                    <TextBlock Text="Test2" Foreground="White"></TextBlock>
                                </StackPanel>
                            </ControlTemplate>
                        </s:SpritePointMarker.PointMarkerTemplate>
                    </s:SpritePointMarker>
                </s:FastLineRenderableSeries.PointMarker>
            </s:FastLineRenderableSeries>
Version
5.5
  • Oleksandr Shvets
    Hi Daniel, Thanks for your question. Could you please peovide us with more information regarding what are you trying to achieve? Thanks in advance, Oleksandr
  • You must to post comments
0
0

We have an example of creating a custom PointMarker using data from PointMetadata here:

https://www.scichart.com/example/wpf-chart-example-series-with-metadata/

enter image description here

Let me know if this helps,

Best regards
Andrew

  • 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