Routed Events in Silverlight 3

Foundation Expresssion Blend 3 with Silverlight

Foundation Expresssion Blend 3 with Silverlight

I am pleased to announce that I once again had the privilege of editing a new book for Friends Of Ed: Foundation Expression Blend 3 with Silverlight.  Compared with the last book, this title focuses exclusively on Silverlight, as opposed to the last book which covers both Silverlight and WPF. The book should be released in a month or so.

After editing this title, I was impressed with the improvements in features, functionality and workflow over the previous version of Silverlight. However, I found myself missing a feature so central to WPF application architecture: custom RoutedEvents. The W3C Document Object Model Level 2 Event Model, an industry standard, details how event routing should happen in great detail. Actionscript added event routing in version 3.0, to universal acclaim. Even Javascript events use the routing standard.

Silverlight 3 employs event routing for built-in events but, unfortunately, you cannot create your own custom RoutedEvents. Many people, myself included, feel that a properly-used eventing chain is a key element to creating flexible, decoupled applications. The fact that Silverlight 3 still does not allow you to define custom RoutedEvents is a big limitation.

Andrew Whiddett of IdentityMine must have felt the same way because he created a library that addresses that very problem. With this library, developers can create custom Routed Events in their Silverlight 3 applications! As usual with IdentityMine libraries, the implementation is simple and efficient.

The solution is so elegant, so useful that IdentityMine generously chose not to keep it as proprietary intellectual property. Instead, this one is for the community – free and open source. Check out the project at CodePlex for more information.

Explore posts in the same categories: Development, Industry

Comment: