![Avatar](https://secure.gravatar.com/avatar/6410fd2dbf162f079ab92c1da6c2d506.jpg?s=64&d=identicon&r=g)
How can we hide (or disable) the Close Button in a RibbonWindow?
The minimize/maximize buttons are handled via properties, but I don't see a way to disable or hide the close button.
How can we hide (or disable) the Close Button in a RibbonWindow?
The minimize/maximize buttons are handled via properties, but I don't see a way to disable or hide the close button.
Note that I've even tried installing a Windows hook to disable the close button by name and position (using PInvoke of EnableMenuItem), but it appears this is overridden internally. The same code works fine on a normal Window instance.
Hi Reed,
Something like this should work:
var chrome = WindowChrome.GetChrome(this);
if (chrome != null)
chrome.HasCloseButton = false;
Thanks - that seems to do the trick.
Please log in to a validated account to post comments.