This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, in our applications we use the WPF-PropertyGrid with ModelObjects that implement INotifyPropertyChanged according to http://msdn.microsoft.com/en-us/library/ms133023(v=VS.95).aspx Most of the time these objects only report that the object needs to be refreshed by raising a PropertyChangedEvent with null as the PropertyName (which is in accordance with the ComponentModel, see link above). When the SelectedObjectProperty of a WPF-PropertyGrid is bound to such an object, we get an ExecutionEngineException in those cases. Looking at the source I found places in Node.cs (OnSourcePropertyChanged and IWeakEventListener.ReceiveWeakEvent) where PropertyName is assumed to be equal to a node's PropertyName, the general case without any PropertyName (nullOrEmpty) seems to be ignored or even raises errors. With slight changes in these passages, everything works like a charm. Could you please provide a bugfix for this? |
|
|
Thanks for reporting this. There will be a candidate fix in the 15 Oct 2010 nightly, available around 1500 GMT. Please note that WPF Property Grid fixes are now delivered through WPF Elements 3.0 nightly builds. Quick caveat: I wasn't able to reproduce the exact exception you report, but I have fixed the errors I did see -- if the nightly doesn't fix the errors in your case, could you send through a repro and/or details of the changes you made that fixed it at your end? |
|
|
Hi Ivan, thanks for the quick reaction, I will try that build today.
|
|
|
FYI, some more findings about that ExecutionEngineException: http://msdn.microsoft.com/en-us/library/system.windows.iweakeventlistener.receiveweakevent.aspx https://connect.microsoft.com/VisualStudio/feedback/details/424826/returning-false-from-a-iweakeventlistener-receiveweakevent-crashes-the-application-with-an-executionengineexception?wa=wsignin1.0 As stated in the third link: "This is by design (albeit painful)" |
|
|
The nightly build fixed it. Thanks for your quick help. |
|