Disabling Minimize and Maximize buttons in a WPF Window

Posted by marianor on ASP.net Weblogs See other posts from ASP.net Weblogs or by marianor
Published on Mon, 22 Mar 2010 20:06:09 GMT Indexed on 2010/03/22 20:11 UTC
Read the original article Hit count: 1601

Filed under:
In WPF there is no possibility to control when the Minimize and Maximize buttons are disabled when the WindowStyle is SingleBorderWindow or ThreeDBorderWindow . In Windows Forms there are some properties like ControlBox , MinimizeBox and MaximizeBox that allow to do that. Because the WPF window internally has a hWnd we can do this using Windows API ( GetWindowLong and SetWindowLong will do the trick). I did three attached properties applicable to Window that use the internal API, in order to disable...(read more)

© ASP.net Weblogs or respective owner

Related posts about wpf