Hi there,
I searched for a topic like this, and there exists two... but they are quite old and no one seems to have posted a workaround.
I have a slider on my main page. I see their values via a data bound label. If you hold and slide the slider, the value will change. However, if you only tap the slider-- the circle's position will move but the slider value will remain 0. A second tap will work just fine.
Here's a screenshot where I tapped two sliders for the first time. You can see the circle has moved but the value remained the same.
https://i.imgur.com/oV64Kb4.png
Here's my XAML, but I doubt it's worth looking at...
<Label HorizontalOptions="Center" VerticalOptions="Center" Text="{Binding Source = {x:Reference slider1}, Path=Value, StringFormat = 'Frequency is {0:0} Hertz' }" x:Name="label1"></Label> <Slider Minimum="0" Maximum="5000" x:Name="slider1"></Slider> <Label HorizontalOptions="Center" VerticalOptions="Center" Text="{Binding Source = {x:Reference slider2}, Path=Value, StringFormat = 'Amplitude is {0:0} Meters' }" x:Name="label2"></Label> <Slider Minimum="0" Maximum="32760" x:Name="slider2"></Slider>
Thanks for checking the thread out,
Nick
Hi @Nickprovs,
Your code seems okey at first glance.
However if you can use the MVVM completely, this thing is easy as pie. Following works like a charm for me.
private int _MinAge; public int MinAge { get { return _MinAge; } set { //method to notify property change SetProperty(ref _MinAge, value); } } <Slider Maximum="99" Minimum="18" Value="{Binding MinAge}" />
Hope it helps.
Answers
Hi @Nickprovs,
Your code seems okey at first glance.
However if you can use the MVVM completely, this thing is easy as pie. Following works like a charm for me.
Hope it helps.
Hello,
its a xamarin form bug.
Solution for me was: