Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

List to ObservableCollection with INotifyPropertyChanged

$
0
0

Hi Guys,

i have the following Property:

public ObservableCollection List
{
get
{
if (list.Count == 0)
{
// query database and return list
List tempList = QueryDataBase();
list = new ObservableCollection(list);
}
return list;
}
set
{
list= value;
}
}

Now when a item changes in 'list' i want the notifypropertychanged event to be called.

Any ideas on how i can handle this?

I cant change the returntype of QueryDataBase() to be an ObservableCollection.

Thanks


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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