Here's a little XAML fragment. You will see
<StackPanel>
<TextBox x:Name="txtValue">250</TextBox>
<Slider x:Name="slide" Value="{Binding ElementName=txtValue, Path=Text, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" Minimum="0" Maximum="500"></Slider>
</StackPanel>
- when you change the textbox value, the slider updates
- If you change the slider value explicitly, the previous behavior breaks a.k.a. stops working.
If I remove the Mode=OneWay
set directive, (defaults to two-way) everything works perfectly.
Why is this happening?