
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.