Hiding close button in RibbonWindow

Ribbon for WPF Forum

Posted 12 years ago by Reed Copsey
Version: 14.1.0601
Avatar

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.

Comments (3)

Posted 12 years ago by Reed Copsey
Avatar

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.

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Reed,

Something like this should work:

var chrome = WindowChrome.GetChrome(this);
if (chrome != null)
	chrome.HasCloseButton = false;


Actipro Software Support

Posted 12 years ago by Reed Copsey
Avatar

Thanks - that seems to do the trick.

The latest build of this product (v25.1.3) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.