Typically, I create the View in xaml, and bind Events to the ViewModel using Caliburn.Micro.
The code is not in the CodeBehind, it's in a Factory class.
Greg
<Button cal:Message.Attach="[MouseLeftButtonUp]=[ModifyList($source)]" />
However, I now need to create the button in code, based on configuration data.The code is not in the CodeBehind, it's in a Factory class.
Button button = new Button(){Content = "Click Me"};
So the question is how to wire up the event in code instead of Xaml?Greg