What it is the most brief and concise way of adding event handlers to UI elements in XAML via an IronRuby script? Assumption: the code to add the event handler would be written in the IronRuby script and the code to handle the event would be in the same IronRuby script.
I'd like the equivalent of the following code but in IronRuby. Handling a simple button1 click event.
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
button1.Click += new RoutedEventHandler(button1_Click);
}
void button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Hello World!");
}
}