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

INotifyProperty Not Working for static properties in xamarin forms

$
0
0

I have implemented INotifyPropertyChanged for static property in my code. But it doesn't affect UI. Here i have added my code. Anyone has idea on this. Thanks in Advance.

 private static string dateTimeValue;
 public static string DateTimeValue { get { return dateTimeValue; } set
    { dateTimeValue = value; RaisedPropertyChanged("DateTimeValue"); } }

static void RaisedPropertyChanged([CallerMemberName] string name = null)
{
    if (PropertyChanged != null)
        PropertyChanged(null, new PropertyChangedEventArgs(name));
 }

The xaml code is,


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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