Why does the ObservableObject in MVVM-Light no longer implement INotifyPropertyChanging?

I have used ObservableObject

some other classes that derive from it, for example ViewModelBase

. I have updated version 5.0.1.31549. And it looks like ObserableObject no longer implements INotifyPropertyChanging

.

Is there a reason for this? Are there alternative classes, or should I implement the interface and associated methods, for example RaisePropertyChanging()

?

+3


source to share


1 answer


This is probably because PCL projects do not support INotifyPropertyChanging

, and MvvmLight has most of the base code ported into the PCL project to support desktop and mobile devices. You can see it commented out in the source . You need to go to ObservableObject

. doesn't seem to link it directly. "GalaSoft.MvvmLight → GalaSoft.MvvmLight (PCL) → ObservableObject.cs"

public class ObservableObject : INotifyPropertyChanged /*, INotifyPropertyChanging*/

      



You can also see this answer for an alternative approach that you could use to implement what you need.

Note that it still implements INotifyPropertyChanged

and ViewModelBase

still comes from ObservableObject

, so in most cases they should be fine for your desktop or mobile using MvvmLight.

+3


source







All Articles