Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When we explored POCO events in Chapter 14, we saw that in .NET, and event always receives two parameters; the first is the object that raised the event, and the second is an instance of System.EventArgs or one of its descendants. That basic pattern doesn’t change when you’re working with routed events, but the second argument will be an instance of RoutedEventArgs or one of its descendants (RoutedEventArgs itself descends from EventArgs). Just as with POCO events, the argument can tell you a lot about the event and with routed events, it can also let you control how the event behaves. Here’s one branch of the RoutedEventArgs hierarchy: