Recently I purchased and voraciously read Chris Anderson’s book “Essential Windows Presentation Foundation.” Shortly after cracking it open for the first time I realized that this is a book which every WPF developer must read. I highly recommend it.
Anderson was one of the chief architects on the WPF team at Microsoft. He was involved with many design iterations of the platform over the course of several years. As a result, the depth and insight into the platform which his book offers is truly astounding. He does not only explain what you can do with WPF, but explains why the features of the platform were designed the way they were.
Anderson will even discuss how some features were initially conceived but why the initial design did not work well, and how the final design overcomes those problems. For example, the styling system in WPF initially used a miniature query language to specify how a style should be applied to elements in a UI. He explains the shortcomings of that model and why the styling system we are all familiar with is better. That is priceless information for anyone who is serious about understanding the Windows Presentation Foundation.
Toward the beginning of the book Anderson lists the three overarching principles behind the design of WPF: element composition, rich content everywhere, and a simple programming model. Throughout the rest of the book he demonstrates how the various functional areas in the platform adhere to those guiding principles. Looking at the platform from that perspective clarified a lot of things for me. I found it especially interesting how he discusses the command model as a means of simplifying the programming model of a composition-based architecture.
In my review of “Windows Presentation Foundation Unleashed” I stated that “I just can’t go back to reading black-and-white books about WPF.” I guess I was wrong! The images in “Essential Windows Presentation Foundation” are black-and-white, but it didn’t bother me one bit. Anderson’s book is not done any injustice by black-and-white images. The content of the book is so interesting, and well presented, that the images were not very important to me.
I have only one qualm with Anderson’s book. I was hoping that it would have an in-depth explanation of the Media Integration Layer (MIL). There still seems to be a big gaping hole in general around this topic, not only in Anderson’s book. It would have been great if he really dove deep into how drawing instructions are sent to the render thread, how changes to the visual tree are communicated to the MIL representation of the UI, how this works in a remote desktop scenario, etc. Unfortunately I guess I’ll have to wait for someone else to demystify that topic.
To recap, I think that “Essential Windows Presentation Foundation” is a must-read for WPF developers. Take my word for it, just buy the book and start reading it.