title: How to set the value of a slider without triggering the ValueChanged event again in C# in Xamarin?
body: <p>I need to update a slider control because I'm implementing the values in steps of 5. But, when I set the value in the Value changed event, the event is triggered again. How can I set the value of a slider within the ValueChanged event without triggering it again?</p>
  
  <pre><code>                    partial void sliTip_ValueChanged(UISlider sender)
                      {
                          float newStep = (float)Math.Round((sender.Value) / _stepValue);
  
                          sender.Value = newStep * _stepValue;  // &lt;-------   triggers event again
                          //sender.SetValue(newStep * _stepValue, false);
                          //NSNumber number = newStep * _stepValue;
                          //sender.SetValueForKey(number, new NSString("Value"));
  
                          this.lblTip.Text = sender.Value.ToString() + "% tip";
                      }
  </code></pre>
  
  <p>In native Objective-c, you can set the value of a UISlider just fine without the event being triggered:</p>
  
  <pre><code>                    slider setValue:self.tip;
  </code></pre>