I am just starting with a WPF Browser application.
I would like to handle the Before Close Event of the browser, so how would i handle that event?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found this solution.
In the App.xaml.cs file:
In the App.xaml file:
So basically the ShutdownMode property needs to be set in order to make it work.
Then add a
eventin app.xaml.cs:Then on the relevant page:
The only problem with this is, you can’t stop the application from exiting.
Hope it helps.