Anyone know how to create a routed event in Silverlight 2? In WPF, the code would be like below. However, there’s no EventManager in Silverlight.
public static readonly RoutedEvent ShowVideoEvent = EventManager.RegisterRoutedEvent('ShowVideo', RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(NavBar)); public event RoutedEventHandler ShowVideo { add { AddHandler(ShowVideoEvent, value); } remove { RemoveHandler(ShowVideoEvent, value); } }
At least for the time being, there doesn’t seem to be a way to create your own. That post was however for Beta2, looking at the document for Beta2->RC0 breaking changes, there doesn’t seem to be any mention of anything. But then I guess it could be no breaking change, we can always hope eh 😉
There are a number of events which are routed but again I’m not sure this documentation has been updated for RC0.