在Excel应用程序中禁用关闭按钮 [英] Disable close button in Excel Application
本文介绍了在Excel应用程序中禁用关闭按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能告诉我如何禁用在wpf窗口中打开的excel应用程序中的Close(x)按钮.
谢谢与问候,
我不确定是否有可能禁用" WPF中的关闭窗口.但是您可以通过将WindowStyle
设置为None
来隐藏显示最小,最大化和关闭按钮的标题栏.
在您的XAML中执行此操作:
< Window x:Class ="
WindowStyle =" 无"
或者,您可以创建一个自定义标题栏并创建自己的按钮,以最小化,最大化以及类似地使用关闭按钮(可以将其禁用).
祝你好运.
Hi,
Can anyone tell me how to disable Close(x) button in an excel application which is opened inside a wpf window.
Thanks & Regards,
Ramana
解决方案
I am not sure whether its possible to "disable" the close window in WPF. But you can hide the title bar which shows the minimize, maximize and close button by settingWindowStyle
toNone
.
Do this in your XAML:
<Window x:Class="Window1" WindowStyle="None"
Or you can create a custom title bar and create your own buttons for minimize, maximize and similarly for the close button(which you can disable it).
Good luck.
这篇关于在Excel应用程序中禁用关闭按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文