I want to do somethink like this:
<Grid Button.Click="grid_Button_Click">...</Grid>
but in code.
I read http://msdn.microsoft.com/en-us/magazine/cc785480.aspx, but I didn’t found answer.
For example I have code:
Object gr = new FrameworkElement();
gr.Click = += ( o, args ) => { /* ... */ };
How to do it?
EDITED
You can certainly do this, although I would debate the need.
Either way, it can be done like this…