Ironruby BitmapImage ImageOpened事件

时间:2012-07-31 14:44:14

标签: silverlight event-handling ironruby bitmapimage

此代码

uri=Uri.new(@header_image, UriKind.Relative)        
bi=BitmapImage.new(uri)
bi_opened=bi.GetType.get_event("ImageOpened")
on_bi_opened = System::EventHandler.new { |sender, e|
  HtmlPage.Window.Alert("Loaded")
}
bi_opened.add_event_handler(bi, on_bi_opened)

收到错误

ArgumentException: Can't convert object of type "System.EventHandler" to type "System.EventHandler` 1 [System.Windows.RoutedEventArgs] ".  

我如何在IronRuby中捕获ImageOpened事件?

0 个答案:

没有答案