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

Implementing INotifyPropertyChanged for an OS-related value

$
0
0

I'm trying to implement INotifyPropChanged for a volume level property, which is required to be set and updated dynamically (i.e., the label should change as the user presses up and down volume keys). I can get the value, flawlessly, and I can get it to update too, but it seems to notify the change way too many times, even though I've tried using a backing store field too.

code sample below:
{
get
{
if (volumeLevel != null)
{
return volumeLevel;
}
var sound = DependencyService.Get();
OnPropertyChanged(nameof(VolumeLevel));
return sound.GetCurrentRingtoneLevel();

        }

what am I doing wrong? Many thanks in advance


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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