Hide Maximize/Minimze buttons?Is there a way to hide the max/min buttons for the window?  I know you can use ToolWindow, but I'm having some problems using that style (it gets lost in the ALT-TAB menu) so I need a different way.  And I don't really want to rewrite the window chrome or redraw the borders if I don't have to.© 2009 Microsoft Corporation. All rights reserved.Mon, 06 Jul 2009 16:39:08 Z47728435-4c0c-4a20-97bd-6c3470749461http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#47728435-4c0c-4a20-97bd-6c3470749461http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#47728435-4c0c-4a20-97bd-6c3470749461Kofoedhttp://social.msdn.microsoft.com/Profile/en-US/?user=KofoedHide Maximize/Minimze buttons?Is there a way to hide the max/min buttons for the window?  I know you can use ToolWindow, but I'm having some problems using that style (it gets lost in the ALT-TAB menu) so I need a different way.  And I don't really want to rewrite the window chrome or redraw the borders if I don't have to.Thu, 02 Jul 2009 22:51:39 Z2009-07-02T22:51:39Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#f9e3ef0b-73f5-4317-925b-30034fabcf1chttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#f9e3ef0b-73f5-4317-925b-30034fabcf1cnoorbakhshhttp://social.msdn.microsoft.com/Profile/en-US/?user=noorbakhshHide Maximize/Minimze buttons?Kofoed,<br/> If you also don't want to resize the window, a  ResizeMode=&quot;NoResize&quot; will do it. It will remove them, but then, no resizing either.<br/> <br/> Hope this helps.<hr class="sig">noorbakhshFri, 03 Jul 2009 00:01:50 Z2009-07-03T00:01:50Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#d4092a35-2781-4230-89df-0cad662535cahttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#d4092a35-2781-4230-89df-0cad662535caharjohnhttp://social.msdn.microsoft.com/Profile/en-US/?user=harjohnHide Maximize/Minimze buttons?<span style="font-size:x-small;color:#0000ff"><font size=2 color="#0000ff"> <p><br/>Hi,<br/><br/>put this line of code after <span style="font-size:x-small">InitializeComponent<br/></span><br/>this</p> </font></span> <p><span style="font-size:x-small">.WindowStyle = </span><span style="font-size:x-small;color:#2b91af">WindowStyle</span><span style="font-size:x-small">.None;<br/><br/><br/>hope solve ur problem</span></p><hr class="sig">Harshad..... Always 4 USat, 04 Jul 2009 06:00:56 Z2009-07-04T06:00:56Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#d8370afa-5081-41f3-9c7c-ff465f992981http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#d8370afa-5081-41f3-9c7c-ff465f992981harjohnhttp://social.msdn.microsoft.com/Profile/en-US/?user=harjohnHide Maximize/Minimze buttons?Hi,<br/><br/>put this line of code after <span style="font-size:x-small"><span style="font-size:xx-small">InitializeComponent()</span><br/><br/><br/>this.WindowStyle = WindowStyle.None;<br/><br/><br/>Hope Solve ur Problem............</span><hr class="sig">Harshad..... Always 4 USat, 04 Jul 2009 06:03:11 Z2009-07-04T06:03:11Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#9b07ad2d-c103-49f3-a52a-1fa6bf9cce74http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#9b07ad2d-c103-49f3-a52a-1fa6bf9cce74John Simmons - outlaw programmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=John%20Simmons%20-%20outlaw%20programmerHide Maximize/Minimze buttons?I don't understand why *all* resizing is disabled just because the min/max buttons are removed from the titlebar...<br/> <br/> <br/>Sat, 04 Jul 2009 10:18:13 Z2009-07-04T10:18:13Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#dab842eb-89e8-44df-9103-5901be019f7chttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/47728435-4c0c-4a20-97bd-6c3470749461#dab842eb-89e8-44df-9103-5901be019f7cZhi-Xin Yehttp://social.msdn.microsoft.com/Profile/en-US/?user=Zhi-Xin%20YeHide Maximize/Minimze buttons?Hi Kofoed,<br/> <br/> You can remove the WS_MAXIMIZEBOX and WS_MINIMIZEBOX from the window style via P/Invoke.<br/> <br/> <pre lang="x-c#">[DllImport(&quot;user32.dll&quot;, SetLastError = true)] static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport(&quot;user32.dll&quot;)] static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); private const int GWL_STYLE = -16; private const int WS_MINIMIZEBOX = 0x20000; private const int WS_MAXIMIZEBOX = 0x10000; void Window5_Loaded(object sender, RoutedEventArgs e) { IntPtr hwnd = new WindowInteropHelper(this).Handle; long windowLong = GetWindowLong(hwnd, GWL_STYLE); windowLong = windowLong &amp;~ WS_MAXIMIZEBOX; windowLong = windowLong &amp;~ WS_MINIMIZEBOX; SetWindowLong(hwnd, GWL_STYLE, (int)windowLong); }</pre> <br/> <br/> Best Regards,<br/> Zhi-Xin<hr class="sig">Please remember to mark the replies as answers if they help and unmark them if they provide no help. <br/> <a href="http://cfx.codeplex.com/">Welcome to the All-In-One Code Framework!</a> If you have any feedback, please tell us. <br/> Send us any feedback you have about the help from MSFT at <a href="mailto:fbmsdn@microsoft.com">fbmsdn@microsoft.com</a>. Mon, 06 Jul 2009 16:39:08 Z2009-07-06T16:39:08Z