tags:

views:

17

answers:

2

Hello,

I want to raise PropertyChanged for all 20 Properties of my ViewModel in once and get the solution: RaisePropertyChanged(String.Empty) see: http://stackoverflow.com/questions/1859946/c-wpf-propertychanged-for-all-properties-in-viewmodel

Since I use GalaSoft.MvvmLight.ViewModelBase.RaisePropertyChanged of MVVM Light, I get the runtime error: Message=Property not found ParamName="" Source=GalaSoft.MvvmLight.WPF4 This is because MVVM Light check all Property-Names. What can I do?

Thanks Peter

A: 

You could file a bug report and, in the meantime, change MVVM Light yourself.

HTH,
Kent

Kent Boogaart
A: 

If you look at the source, you'll see that this exception is only raised when you're compiling as DEBUG. If you compile as RELEASE you won't get this behavior anymore.

Like Kent said, I changed the source to do a Debug.Writeline instead of throwing an exception. I don't like the default behavior, especially since I will commonly re-raise PropertyChanged to a parent ViewModel from a list of child ViewModels.

Matt Casto