Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

Add an ability to control Windows rounded corners behavior

Open BAndysc opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

On Windows, rounded corners are currently requested at this location:

https://github.com/AvaloniaUI/Avalonia/blob/58de42b101ae19bfd84891423d949ed7f346f777/src/Windows/Avalonia.Win32/WindowImpl.cs#L1157-L1158

However, to maintain the aesthetic of the Classic theme, DWMWCP_DONOTROUND should be applied instead. I would still like to use SystemDecorations=Full to retain TitleBar dragging and window resizing functionality.

Describe the solution you'd like

Introducing a new StyledProperty PreferRoundedCorners on the Window could handle this, allowing flexibility within this method.

Describe alternatives you've considered

While I can manually call DwmSetWindowAttribute in the ExtendClientAreaToDecorationsChanged event, having a dedicated property would make it simpler.

Additional context

No response

BAndysc avatar Oct 16 '24 20:10 BAndysc

PreferRoundedCorners

It should probably follow the current hint pattern to indicate it may not work/do anything.

thevortexcloud avatar Oct 17 '24 09:10 thevortexcloud