There is a WPF application.
I want to register when the application is closed.
but I can’t change the application (some kind of limitation, simply because the business).
So, I create an invisible form component that lives inside an existing application, adding it as a dll library, so the existing application does not need to be changed.
but the problem is how does my invisible component know that the application is closing?
is there any function or event handler that i can use?
Decision:
there is some kind of event
unloaded closing closed
all three of these events will be fired when the main windows are closed.
Problem resolved