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

Winforms-When added the option(button) in panel not shown the option with HighDpi and custom scaling applied in .NET 5.0 #4838

Closed
vijayarasan opened this issue Apr 23, 2021 · 7 comments · Fixed by #6122
Assignees
Labels
area-HDPI-SA Issues related to high DPI SystemAware mode 🪲 bug Product bug (most likely)

Comments

@vijayarasan
Copy link

When setting the scaling 100% Control size and alignment are proper in the panel with HighDpi in the .Net 5.0 application. Please refer to the below screenshot for your reference,

DPI enabled:
Dpi100Scaling

Scaling:
Scaling

Control size and alignment are proper in the panel with HighDpi 100% scaling
Buttonalignedanddisplayproperly

When setting the custom scaling 150% Control size and alignment is not proper in the panel with HighDpi in the .Net 5.0 application. Please refer to the below screenshot for your reference,

DPI enabled:
DpiAndCustomScaling

Scaling:
CustomScaling

Control size and alignment are not proper in the panel with HighDpi 150% scaling
ButtonTextNotDiplayed

Steps to reproduce the bug:

1.Run the Sample.

2.Click the button in the form.

Sample: Sample.zip

Expected Behavior:
The button should be properly aligned and display the text while setting custom scaling (150%).

Observed Behavior:
The button is not properly added and aligned. Button text is not shown while setting custom scaling (150%).

Can anyone share an idea to resolve the reported problem?

Regards,
Vijayarasan S

@dreddy-work dreddy-work added area-HDPI-SA Issues related to high DPI SystemAware mode 🪲 bug Product bug (most likely) labels Apr 23, 2021
@dreddy-work
Copy link
Member

Thanks @vijayarasan for providing the sample. Will be looking in to it on what is going on.

@kirsan31
Copy link
Contributor

The problem is AnchorStyles.Right, same as #3168.
@vijayarasan if you comment it here:
image
you will get almost desire result:
image

Blog post about scaling problems with Anchor Right/Bottom.

@RussKie RussKie added this to the 6.0 milestone Apr 25, 2021
@merriemcgaw
Copy link
Member

@kirsan31 Great blogpost link! We should totally create another issue in the runtime repo describing what's up with Anchor right/bottom properties and see if we can't get it addressed as part of the HDPI effort.

@vijayarasan
Copy link
Author

Hi @kirsan31,

Thanks for the update.

We have implemented provided solution. but we are facing another problem while resizing the Panel. After commenting on the AnchorStyles.Right while resizing the control not properly resizing the right side. It shows blank while resizing the control to the right side. Can you provide any suggestions to resolve this problem?

Regards,
Vijayarasan S

@vijayarasan
Copy link
Author

Hi Team,

Any update on this.

Regards,
Vijayarasan S

@kirsan31
Copy link
Contributor

I'm afraid, that most of the HIDPI changes have been pushed back to 7.0 :(

@ghost ghost added the 🚧 work in progress Work that is current in progress label Nov 5, 2021
HDPI support in .NET automation moved this from ToDo to Done Nov 5, 2021
@ghost ghost removed this from the 7.0 alpha1 milestone Nov 5, 2021
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Nov 5, 2021
@Philip-Wang01
Copy link

Verified this issue with latest .NET SDK 7.0.100-alpha.1.21566.13 build, it is fixed that The button properly aligned and display the text while setting custom scaling (150%)
image

@dotnet dotnet locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-HDPI-SA Issues related to high DPI SystemAware mode 🪲 bug Product bug (most likely)
Development

Successfully merging a pull request may close this issue.

6 participants