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

0
0

In my SciChart InteractionToolbar, I have a slider that changes the stroke thickness of the selected series.

<TextBlock Text="Line Thickness:"/>
<wpfTool:IntegerUpDown Foreground="White" 
x:Name="Thickness" 
Minimum="1" 
Maximum="10" 
Value="{Binding SelectedSpectrum.StrokeThickness, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueChanged="Thickness_ValueChanged">
</wpfTool:IntegerUpDown>

This works correctly until a new series is selected. When a new series is selected, the previously selected series thickness returns to its default of “1”. Is there a way I can persist my StrokeThickness value even when the series is no longer selected?

    private void Thickness_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
    {
        if ((sciChartSurface.RenderableSeries != null) && (e.NewValue != null))
        {
            var selectedSeries = sciChartSurface.RenderableSeries.Where(s => s.IsSelected == true).FirstOrDefault();
            if (selectedSeries != null)
            {
                selectedSeries.StrokeThickness = (int)e.NewValue;
            }
        }
    }
Version
5.3
  • You must to post comments
0
0

Hello Kyle,

Thank you for your inquiry. I am sorry for the late reply.
Please try this with the latest SciChart v5.4 build. Here is how to get our nightly builds:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget

Please let me know if this helps.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+