Disable maximize button of WPF window, keeping resizing feature intact

后端 未结 6 1474
遇见更好的自我
遇见更好的自我 2021-01-31 02:13

So WPF windows only have four resize mode options: NoResize, CanMinimize, CanResize and CanResizeWithGrip. Unfortunately, the

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-31 02:42

    You can create a custom window by setting WindowStyle to None, which removes the Minimize, Maximize and Close buttons, and create yourself the buttons you need. That's a great example for this:

    http://www.codeproject.com/Articles/131515/WPF-Custom-Chrome-Library

    It gives you some extra work, but if you realy don't want to use WinAPI, that's an option.

提交回复
热议问题