Refresh ObservableCollection in WPF

ObservableCollection only provided notifications when we make any change in the collection itself like Adding or Removing an Item.

If we update any properties of a contained class, it doesn’t raise any notifications.

For e.g.

If I have an ObservableCollection of Person object and it is bind to a TreeView. If I add or remove person object from the ObservableCollection I will be able to see the changes in my TreeView also.

Here Person object has only one string property FullName

Now if I click on Change Name button, which simply renames the selected Person, I will not be able to see the change in my TreeView.

Here in this case we need to call the Refresh method of CollectionViewSource.


Have a look at this solution as well

Hope it helps.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

12 thoughts on “Refresh ObservableCollection in WPF”

  1. I extended the ObservableCollection type

    on your ViewModel you can call;

    MyObservableCollection.SendUIRefreshNotification() – To Update all entries in the collection or;

    MyObservableCollection.SendUIRefreshNotification(item) – To only refresh a specific entry

    public static class FwExtensions
    public static void SendUIRefreshNotification(this ObservableCollection observableCollection, T item)
    var index = observableCollection.IndexOf(item);
    observableCollection.Insert(index, item);

    public static void SendUIRefreshNotification(this ObservableCollection observablecollection)
    var a = observablecollection.ToList();
    foreach (var item in a)


Please share your thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.