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;
}
}
}
- Kyle Williamson asked 5 years ago
- You must login to post comments
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.
- Oleksandr Shvets answered 4 years ago
- You must login to post comments
Please login first to submit.