7

In WPF, how can I hide the minimize button (only the minimize, not also the maximize...) of a window.

The code in this forum almost work for me. The behavior of that code is that it's disabled the minimize button. But, how hide it?

http://forums.silverlight.net/forums/p/222067/532926.aspx

Melursus
  • 10,328
  • 19
  • 69
  • 103
  • As Bolu points out, you'd have to render your own window chrome. Windows will only hide the minimize/maximize buttons as a group. So even with the Win32 API you can't hide only the minimize button. You can disable it, but that's separate. – CodeNaked Jun 29 '11 at 16:15

2 Answers2

15

How about disabling the resize attribute?

ResizeMode="NoResize"
LazyZebra
  • 1,097
  • 16
  • 24
7

I think you would have to hide the default window title and draw your own titlebar.

e.g.: C# WPF Custom Title Bar Tutorial and Moving a WPF Window with Custom Chrome

Bolu
  • 8,696
  • 4
  • 38
  • 70
  • I opened an issue for voting in the WPF github repository to add more control over these buttons: https://github.com/dotnet/wpf/issues/4294 – Thraka Mar 18 '21 at 17:48