I've just upgraded a Csla application to Silverlight 5 and have found a strange behavior. I have properties that get formatted using business rules after they have been entered in a TextBox do not get reflected back in the TextBox. What I'm noticing now is that the TextBox does no longer reflects the updated value. To test this further I created a simple Silverlight app with a class that implemented a single property using the INotifyPropertyChanged interface to cut Csla out of the picture completely. I would format the value in the set method and call OnPropertyChanged, but still the TextBox did not reflect the newly formatted value. If I changed the property externally through a button even, then TextBox would update accordingly. Just not if the textbox itself is changing the property. I'm very sure this was working in Silverlight 4. I'm not sure if things have changed in Silverlight 5 and I missed it or if something is wrong. Can anyone confirm this behavior?
it is possible that SL5 is closer to WPF in this regard, where changed properties aren't echoed into the UI unless the binding has a value convter attached. That would be a shame, because I always viewed this as a bug. But Microsoft views it as a performance optimization...
try attaching a value converter and see if that helps.
Thanks for your response, Rocky. Since the issue is not Csla based, I won't further the discussion here. However, I would like to point out that the non-updating occurs only while running in the IDE. I use IE in the IDE for debugging, as well. Outside of the IDE, the TextBox gets updated with the newly formatted value just fine. So it appears that the SL team may have (inadvertently?) changed something while debugging in SL.
So this only occurs during debugging? That could just be a bug in SL5 then.
Copyright (c) Marimer LLC