Simple WPF app with a plain, empty Window
in which I hook up an event handler to the Window's Activated
event:
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
Activated += OnWindowActivated;
}
private void OnWindowActivated(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
When an exception is thrown in the handler and unhandled anywhere else, I expected the app to die, but it doesn't. WPF seems to be swallowing the exception somewhere and the Window pops up and keeps on running just fine.
Why?