SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0 votes

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:


                <!-- 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">
                        <Style TargetType="s:BaseRenderableSeries">
                            <Setter Property="SeriesColor" Value="White"/>
                            <Setter Property="PointMarkerTemplate">
                                        <s:EllipsePointMarker Fill="#FF00DC" Stroke="White" Width="7" Height="7"/>

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


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?


  • bbmat asked 7 years ago
  • last active 7 years ago
Showing 1 result
This template supports the sidebar's widgets. Add one or use Full Width layout.