Cover page by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

18. WPF Interactions

In the same way that WPF extends (adds functionality to) the basic .NET property mechanism, it also extends the .NET event pattern that we explored in Chapter 14 by introducing ROUTED EVENTS.

A standard .NET event can be handled by any object that registers a handler for it. WPF routed events can behave that way, too, but they can also travel up and down the logical tree, letting the event be handled by the most appropriate object in the logical tree. That’s particularly important in WPF because of the way objects are nested. When you create a Button, for example, you want to set an event handler on the Button itself, not on every one of its visual children.

After we’ve explored the WPF event model, we’ll examine WPF commands ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required