Version3.8.1 / PropertyStatus didn't respond when the DependentProperty changed

Version3.8.1 / PropertyStatus didn't respond when the DependentProperty changed

Old forum URL: forums.lhotka.net/forums/t/8045.aspx


Hugo.Yang posted on Wednesday, November 25, 2009

Version3.8.1 / PropertyStatus didn't respond when the DependentProperty changed

RockfordLhotka replied on Wednesday, November 25, 2009

If this is in a WPF UI, you need to set Csla.ApplicationContext.PropertyChangedMode to Xaml.

Hugo.Yang replied on Wednesday, November 25, 2009

Thanks Rocky!
This is in a Silverlight UI, and i have try it as you told me.
Perhaps I didn't describe my question clearly, for example, there're property A and property B.
I set the ValidationRules like this:

ValidationRules.AddRule(BIsDifferentFromA, BProperty);
ValidationRules.AddDependentProperty(AProperty, BProperty);

So i hope the PropertyStatus which binding to the B property will be display the error when property A changed from the Silverlight UI.
In Csla 3.7.1, the PropertyStatus control is binding with "Source" property, so when the source changed, it can be updated. But in Cals 3.8.1, it binding with "Property" property.

RockfordLhotka replied on Wednesday, November 25, 2009

In 3.7 the Source property just pointed to the business object, the Property
property had to be set.

In 3.8 there is no Source property because the Property property is now a
binding expression that points to the actual business object property
directly.

RockfordLhotka replied on Wednesday, November 25, 2009

I replicated the issue, so it is clearly a bug. I'll add it to the list.

Hugo.Yang replied on Wednesday, November 25, 2009

Thanks! :-)

RockfordLhotka replied on Wednesday, November 25, 2009

Fortunately it was an easy fix. You can see the changes here:

http://www.lhotka.net/cslacvs/viewvc.cgi/core/branches/V3-8-x/cslalightcs/Csla/Silverlight/PropertyStatus.cs?r1=4432&r2=4433

They'll be in 3.8.2, but if you want them now you can easily change PropertyStatus.cs yourself in the meantime.

Copyright (c) Marimer LLC