I have a question about a multiple stepped sliders. I am trying to create multiple stepped sliders, but the problem is that I don't know how to identify which slider value is changed
This is my constructor:
public FeedbackPage ()
{
InitializeComponent ();
Feedback = new Feedback();
StepValue = 1.0;
SliderValueVak.ValueChanged += OnSliderValueChanged;
SliderValueUitleg.ValueChanged += OnSliderValueChanged;
this.BindingContext = this;
}
As you can see if the value of a slider changes, it calls the OnSliderValueChanged method. The code inside this method is shown here below:
void OnSliderValueChanged(object sender, ValueChangedEventArgs e)
{
var newStep = Math.Round(e.NewValue / StepValue);
SliderValueVak.Value = newStep * StepValue;
SliderValueUitleg.Value = newStep * StepValue;
}
But now if I use one slider, both slider values change, this is because I give them both the same value. Is there a way to use a if statement or swich case to see which slider value is changed?