On slider1_ValueChanged I want to do something and then set a new value to slider but without triggering slider1_ValueChanged again otherwise I may have infinite loop.
I thought that setting a property wouldn’t trigger the event but I just tested with Visual Studio Slider it does trigger its event. Using a flag is really ugly and complex I’d like to avoid maybe by using an other event ?
This is a common problem in Windows forms. You need to unhook the event handlers, make your changes, then hook up the event handlers again.
You can make this easier if you move the event handler hooking/unhooking code into their own functions, so that you can do the hookup from the constructor (or Loaded event) and the ValueChanged event.