modern-forms / Modern.Forms

Cross-platform spiritual successor to Winforms for .NET 6+
MIT License
842 stars 54 forks source link

Titlebar options dosen't work when 'UseSystemDecorations' is set to true #45

Open MrSimsure opened 1 year ago

MrSimsure commented 1 year ago

Hello, awesome work with this library, so far is the only one i found that allow for cross-platform gui development to work with .NET trimming, which is mandatory to get a smaller binary as possible, even better than the original winForm wich still to this day cannot be trimmed. Anyway coming the the problem i found. Using the options: Resizeable, AllowMaximize and AllowMinimize work only when UseSystemDecorations is set to false. The native window of every OS allow to modify the size of the gui even if all of them are set to false.

jpobst commented 1 year ago

We use the native windowing code from Avalonia. It looks like we can set IWindowImpl.CanResize to false to prevent resizing, but they do not appear to support AllowMaximize or AllowMinimize at this time:

https://github.com/AvaloniaUI/Avalonia/issues/3422