Pre loader

Tag: properties

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 votes
26k views

I have the following code and want to move this portion to code-behind but have problems understanding how I can programmatically set the properties in Style:

<s:SciChartSurface.ChartModifier>

                <!-- Provides Interactivity -->
                <s:RubberBandXyZoomModifier IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                <s:ZoomPanModifier XyDirection="XYDirection" ClipModeX = "ClipAtExtents" ExecuteOn ="MouseLeftButton" />
                <s:MouseWheelZoomModifier XyDirection = "XYDirection"/>
                <s:ZoomExtentsModifier IsAnimated = "False" ExecuteOn = "MouseDoubleClick" />
                <s:XAxisDragModifier  DragMode = "Scale"/>
                <s:CursorModifier SourceMode="AllSeries"  UseInterpolation="True"/>

                <!-- Provides selection of series and custom styling to the selected series -->
                <s:SeriesSelectionModifier ReceiveHandledEvents="True" SelectionChanged="SeriesSelectionModifier_OnSelectionChanged">
                    <s:SeriesSelectionModifier.SelectedSeriesStyle>
                        <Style TargetType="s:BaseRenderableSeries">
                            <Setter Property="SeriesColor" Value="White"/>
                            <Setter Property="PointMarkerTemplate">
                                <Setter.Value>
                                    <ControlTemplate>
                                        <s:EllipsePointMarker Fill="#FF00DC" Stroke="White" Width="7" Height="7"/>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </s:SeriesSelectionModifier.SelectedSeriesStyle>
                </s:SeriesSelectionModifier>

                <!-- Provides a data source for the legend control -->
                <s:LegendModifier ShowLegend="True" GetLegendDataFor="SelectedSeries" Margin="10"/>

            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

Particularly the SeriesSelectionModifier and its property setters seem difficult for me to implement in code-behind. Can you please provide some sample code how I would actually implement the SeriesSelectionModifier with above Property Setters above in C# code rather than in XAML?

Thanks

  • bbmat asked 9 years ago
  • last active 9 years ago
Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies