开发者

WPF exit event routing

开发者 https://www.devze.com 2023-02-17 06:27 出处:网络
My question is: will the Application.Exit event tunnel to any children of the application? Like a View UserControl - can I subscribe for it?

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消