日期:2014-05-17  浏览次数:21111 次

继承自Fluent:RibbonWindow的wpf窗体怎么去掉最大化按钮?
1、ResizeMode不好使
2、 int GWL_STYLE = -16;
       int WS_MAXIMIZEBOX = 0x00010000;
       int SWP_NOSIZE = 0x0001;
       int SWP_NOMOVE = 0x0002;
       int SWP_FRAMECHANGED = 0x0020;

       IntPtr handle = new WindowInteropHelper(this).Handle;
       int nStyle = GetWindowLong(handle, GWL_STYLE);
       nStyle &= ~(WS_MAXIMIZEBOX);
 
       SetWindowLong(handle, GWL_STYLE, nStyle);                        SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_FRAMECHANGED);
也不好使
3、改Fluent库,也没改明白
求大神
wpf

------解决方案--------------------
兄弟,你解决这个问题了吗?联系我QQ:28437257