WPF exit event routing
My question is: will the Application.Exit event tunnel to any children of the application? Like a View UserControl - can I subscribe for it?
Why I ask thi开发者_开发知识库s is that my business logic is not available from the Application class and I want to process a Logout on exit.
Tunnelling only applies to routed events in the UI. However, you can access the static instance of the application (Application.Current
) and attach a handler to its exit event from anywhere in your code...
精彩评论