3.1 Expose issue

May 9, 2012 at 6:28 PM

I am using Catel on a project and just recently updated from 3.0.1 to 3.1 via NuGet.  In one of my view models I have a property that is a model object that is decorated with the Model attribute.  I am also exposing several properties of the model object using Expose attributes on the property.  Here is a snippet.

[Model]

[Expose("RxNumber")]

public Prescription Prescription

...

Prior to updating to 3.1 I was able to bind a control in my view to the RxNumber exposed property like (from xaml): Text = "{Binding RxNumber}"

After updating, nothing shows up in the control.  If I change the binding to Prescription.RxNumber the control is populated.

Did something change in the 3.1 build that affected the Expose functionality?

May 9, 2012 at 6:33 PM

Yes, 2 things happened:

1) If there is a real property, it will call that instead of calling SetValue/GetValue directly (but shouldn't affect you)

2) The PropertyDescriptors are now cached to improve performance. However, they should work like normally (we did actually test this for several test cases). Do you have a small repro?

May 9, 2012 at 7:22 PM

The change definitely affected me.  Perhaps I need to configure things differently post-change.  I have created a small app to demonstrate the issue and will upload shortly.

May 9, 2012 at 8:26 PM

Issue is fixed, I just committed it. You can build it yourself, then it will work again. Sorry for the inconvenience.