0

Winforms can switch the ControlBox, Maximize and Minimize buttons on and off. I can't seem to find the equivalent properties to control the window ornaments in WPF. What's the correct nomenclature so I can look up this stuff in msdn?

Andrew Barber
  • 38,454
  • 20
  • 92
  • 120
Peter Wone
  • 16,657
  • 12
  • 76
  • 114

1 Answers1

1

You can change this by setting the ResizeMode of the window

EG:

ResizeMode="NoResize" 
or
WindowStyle="ToolWindow"

will show no minimize/maximize buttons

sa_ddam213
  • 41,546
  • 7
  • 97
  • 109
  • I'm already using that but it leaves the ControlBox and the Close button. – Peter Wone Jan 31 '13 at 03:49
  • As far as I can tell, the only way is to completely replace the ControlTemplate. – Peter Wone Jan 31 '13 at 03:50
  • If yo want nothing at all you can use `WindowStyle="None"`, however this will remove the top border totally, so the only way to do it without that happining is using P-Invoke to remove the close button, this thread may be a good place to start, http://stackoverflow.com/questions/743906/how-to-hide-close-button-in-wpf-window – sa_ddam213 Jan 31 '13 at 03:50
  • I tell a lie, ToolWindow does hide the controlbox. I don't really want to use PInvoke to mess with basic window behaviour and I'm too lazy to write a whole control template, so I'm going with the ToolWindow suggestion, with a handler on closing to hide instead. – Peter Wone Jan 31 '13 at 05:16