I've been looking into MVVM t开发者_JAVA百科oolkits, and MVVM light really appeals to me, especially do to it's focus on "blendability". I put forth the proposal to our engineering team that we move to using it as our go to toolkit for all SL development, and although most people agreed that it was nice, they couldn't understand why BaseViewModel doesn't implement the IDataErrorInfo interface.
Is this an intentional decision in mvvm-light, if so, can someone fill me on why?
IDataErrorInfo is not suitable for all places where you might use a view model. For example, if you've chosen to have a menu backed by view model objects, how would you use IDataErrorInfo in conjunction with a view model that represents a menu item?
I use ViewModelBase as the base for my own ViewModelBases that include additional features I need for that particular circumstance. I agree with mike, you dont want that functionality in the Root ViewModelBase because not all viewmodels would benefit from that functionality, unlike INotifyPropertyChanged or Messenger.
精彩评论