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

How to use INotifyCollectionChanged interface?

$
0
0

I am doing the following:

public class myClass : INotifyCollectionChanged
{
    public ObservableCollection<myModel> myCollection { private set; get; }

    public myClass()
    {
        this.myCollection = new ObservableCollection<myModel> ();
    }

    public event NotifyCollectionChangedEventHandler CollectionChanged;
}

But in XS it says CollectionChanged is never used. What am I doing wrong? Any code need to be added. As such, is it needed to implement the interface? If so, how?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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