31.8. Summary

This chapter examined a number of related WPF topics, all of which are focused on the construction of custom user controls. You started by investigating how WPF places a unique spin on traditional .NET programming primitives, specifically properties and events. As you have seen, a dependency property allows you to build a property which can integrate within the WPF set of services (animations, data bindings, styles and so on). On a related note, routed events provide a way for an event to flow up or down a tree of markup.

You then examined the relationship between a logical tree and visual tree. The logical tree is basically a one-to-one correspondence of the markup you would author to describe a WPF root element. Behind this logic ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.