Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Slider OnValueChanged Not Called On First Click: Any Workaround? [Testing on Android]

$
0
0

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


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>