开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜