Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ability to control Windows rounded corners behavior #17294

Open
BAndysc opened this issue Oct 16, 2024 · 1 comment · May be fixed by #17354
Open

Add an ability to control Windows rounded corners behavior #17294

BAndysc opened this issue Oct 16, 2024 · 1 comment · May be fixed by #17354

Comments

@BAndysc
Copy link
Contributor

BAndysc commented Oct 16, 2024

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

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

int cornerPreference = (int)DwmWindowCornerPreference.DWMWCP_ROUND;
DwmSetWindowAttribute(_hwnd, (int)DwmWindowAttribute.DWMWA_WINDOW_CORNER_PREFERENCE, &cornerPreference, sizeof(int));

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

@thevortexcloud
Copy link
Contributor

PreferRoundedCorners

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants