Chapter 5. Routed Events

In the previous chapter, you saw how WPF created a new dependency property system, reworking traditional .NET properties to improve performance and integrate new capabilities such as data binding and animation. In this chapter, you'll learn about the second shift: replacing ordinary .NET events with a higher-level routed event feature.

Routed events are events with more traveling power—they can tunnel down or bubble up the element tree and be processed by event handlers along the way. Routed events allow an event to be handled on one element (such as a label) even though it originates on another (such as an image inside that label). As with dependency properties, routed events can be consumed in the traditional way—by ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 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.