8. Events & Input

In the last chapter we saw that dependency properties add functionality to POCO properties in order to make certain tasks (particularly binding) much easier. Routed events, although conceptually much simpler than dependency properties, also extend their POCO equivalents, and they make certain tasks easier. Well, one task. They solve the problem of handling input events when UI widgets are composible, which you’ll remember most XAML widgets are. As we’ll see, routed events bubble up the logical tree, allowing an event to be handled by the widget that is interested in it. It’s more convenient to create an event handler for a ComboBox, for example, instead of the individual TextBox controls that it contains.

In Win8 XAML, routed ...

Get Fluent Windows® 8.1 App Development 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.