Click here to Skip to main content
15,909,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I don't find main function nowhere in WPF. So,I have no idea to handle exception centrally in WPF. In winform it is quite easy since main function is in program.cs.
Any help will be greatly appreciated.
Posted
Updated 8-Nov-15 18:17pm
v2

how to use centralized in try and catch operation
 
Share this answer
 

You can handle the DispatcherUnhandledException event of your application.


You can see an example for it here: http://www.wpf-tutorial.com/wpf-application/handling-exceptions/.

 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900