有人知道如何在 Silverlight 2 中创建路由事件吗?在 WPF 中,代码如下所示。但是,Silverlight 中没有 EventManager。
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); }
}