tags:

views:

51

answers:

2

Specifically, not just by removing the buttons but completely disable maximising. This would mean that double-clicking the title bar or dragging the title bar to the top of the screen in Windows 7 would not work. I still want the window to be sizable though.

+2  A: 

Have a look at the CanMinimize field .

Justin Ethier
That doesn't do what I want. I want to disable maximize but allow resizing. CanMinimize prevents resizing.
Bill Jeeves
...and changing people's spelling when it is not incorrect is rude. We aren't all American you know ;)
Bill Jeeves
Sorry about that, although for what it's worth, "Maximize" matches the MSDN docs :)
Justin Ethier
Hehe - not a problem :D
Bill Jeeves
A: 

Removing Maximize from the system menu should be sufficient. I don't know if that will work for the Win7 "docking", let me know if it does.

Here's an article with a helper class for modifying the system menu of a window: http://www.codeguru.com/csharp/csharp/cs_misc/userinterface/article.php/c9327/

It assumes WinForms, but only because you need a window handle. In WPF this can be obtained with a WindowInteropHelper.

Tergiver