PropertyChangedCallback not called
08:05 13 Aug 2015

It looks like WPF doesn't always call the registered PropertyChangedCallback procedure of a DependencyProperty. Even if we manually raise PropertyChanged event from the VM, WPF seems to actually evaluate the old and new value of the property before deciding if it would call the callback. So my questions here are:

  1. Why is this so?
  2. What is the workaround?

Details

My ViewModel has a public property define as follows:

Public ReadOnly Property CurrentSelection() As ObservableCollection(Of Object)

My View binds to this property like this (BetterPropertyGrid is a UserControl that wraps a WinForms PropertyGrid in it and has a DependencyProperty named SelectedObjects):


Now whenever my ViewModel adds or removes objects from CurrentSelection, I manually raise PropertyChanged("CurrentSelection"), but it doesn't seem to update my View.

wpf vb.net dependency-properties inotifypropertychanged