如何从功能区窗口捕获 OnClosing 事件?
在我的应用程序中,我曾经使用从 System.WIndows.Window 扩展的 wpf 窗口。
我正在考虑将它们迁移到使用从 ToolWindow 扩展的功能区 Windows。
不幸的是,我无法将 OnClosing 事件与功能区窗口一起使用。
如何在窗口关闭时触发?
我需要类似下面的东西
protected override void OnClosing(CancelEventArgs e) {
e.Cancel = true;
}
谢谢
In my application I used to use the wpf windows where are extendd from System.WIndows.Window.
I am thinking of migrate them to using Ribbon Windows which are extended From ToolWindow.
Unfortunately I can't use the OnClosing event with Ribbon windows.
How can I trigger when a window is closed?
I need something like the following
protected override void OnClosing(CancelEventArgs e) {
e.Cancel = true;
}
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
在 XAML 添加
上关闭代码添加
Try this:
on XAML add Closing
on Code add