Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, you learned quite a bit about data-binding. You learned different methods to bind to classes, to elements by name, and even to parent elements in the visual tree. How to debug data-binding to troubleshoot the bindings when they aren’t working as expected was discussed. We went over how to implement a special version of data-binding in styles to set dynamic themes at runtime. You learned how to synchronize lists and then how to decouple actions from UI events using commands.
You then learned about the Silverlight validation system and even implemented a framework to provide fluent validation. I shared a brief case study about how this type of framework benefitted a large project and used some complex strategies to create the illusion of simplicity. This is the essence of the popular Model-View-ViewModel (MVVM) pattern that you’ll learn about in Chapter 7. It may seem complex at first, but when done correctly should simplify your projects immensely. If you haven’t used MVVM in the past, you might be surprised to learn that after this chapter you can consider yourself an MVVM veteran. When you built the base entity class and the fluent validation helper, you actually just wrote your own MVVM framework!