开发者

Adding a window listener to a WPF-Window?

How can I add an window/event listener/handler to a wpf-window? I want to kn开发者_如何学Goow, if the user wants to close the window.


You can override OnClosing inside the Window.xaml.cs.


You can subscribe to the Closing event of your Window. You can cancel the action using the EventArgs (and its Cancel property)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜