Hi,
I have recently been doing some development with the Catel MVVM framework & have come up with an issue between Catel & CSLA.
When an object is removed from a BusinessList, the object is marked as dirty, which causes a call to OnUnknownPropertyChanged(). This in turn results in the call:
OnPropertyChanged(string.Empty)
which causes Catel to throw an exception complaining about the lack of a valid property name.
I have hacked a fix by changing the call in OnUnknownPropertyChanged() to:
OnPropertyChanged(
"__Unknown__Property__");
This fixes my immediate issue, but I don't like having to hack the CSLA library.
Does anyone have any better ideas on how to avoid/fix this issue?
File an issue on the Catel framework. The Catel framework obviously does not conform to the documentation from Microsoft.
Read here: http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.propertychanged.aspx
The PropertyChanged event can indicate all properties on the object have changed by using either Nothing or String.Empty as the property name in the PropertyChangedEventArgs.
Ok,
I will file with Catel & post back here when I have something to report...
I have hacked a fix by changing the call in OnUnknownPropertyChanged() to:
OnPropertyChanged(
"__Unknown__Property__");
This fixes my immediate issue, but I don't like having to hack the CSLA library.
That may fix their framework, but it will break standard behavior for all Microsoft data binding technologies, so it is only useful if you never use data binding.
Hi, Catel now accepts calling OnPropertyChanged(String.Empty).
thanks for all your assistance.
Copyright (c) Marimer LLC