UnhandledException of the App class
Code
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
App.Current.UnhandledException += new EventHandler(Current_UnhandledException);
}
void Current_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
//handle exception here. like showing a message box
}
}
No comments:
Post a Comment