Found this neat feature from Jonas’ ppt. What a great feature from WPF data-binding! See page 18.

2 Comments

  1. I gets even better when you don’t have to implement INotifiPropertyChanged or use ObservableCollection. Update Controls does all of that work for you.

    Part of the “annoying problem” that Martin Fowler was talking about was that the View Model (or as he called it the Presentation Model) has to subscribe to these events. The Presentation Model has to respond to changes in the Data Model. And then it has to republish those changes so that the View can respond to them. It becomes a real mess.

    But Update Controls takes a different approach. It works more like a spreadsheet. You just write the formulas and it figures out the dependencies. You never need to notify anybody.

    Say you create a spreadsheet where A1 is “=B1+C1″, and B1 is “=D1*2″. When you change D1, do you have to fire an event to B1? Does B1 then have to turn around and fire an event to A1? Of course not. The spreadsheet recognizes those dependencies and just updates things.

  2. Hi Michael, I like your Update Controls, and really wish next version of WPF will adopt it or come with similar solution.


Post a Comment

*
*