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

I want to update one property of an object inside ObservableCollection

$
0
0

Hi , I am struggling with a problem, my ObservableCollection doest refresh after change in code behind.

  private ObservableCollection<NotificationModel> _notifications = new ObservableCollection<NotificationModel>();

        public ObservableCollection<NotificationModel> Notifications
        {
            get => _notifications;
            set
            {
                _notifications = value;
                RaisePropertyChanged(nameof(Notifications));
            }
        }

this is my list,

After click on some item I Want to update the color of it

 var notification =  _notifications.First(x => x.Id == itemInfo.Id);
                notification.NotificationColor = "#FFFFFF";

but it doesnt work


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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