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

Problem scrolling Dialog content in UWP - Windows 10 - DPI 125%, 150% and 175% #10000

Closed
edsonmata opened this issue Sep 20, 2024 · 4 comments
Closed
Labels
bug Something isn't working needs-author-feedback Asked author to supply more information. no-recent-activity product-winui2

Comments

@edsonmata
Copy link

Describe the bug

Screenshot_1

The dialog content is cut off when performing the described reproduction steps.
Bug:

  • You must have DPI 125%, 150% and 175% and Windows 10
  • You must enable the vertical scrollviewer of the dialog content.
  • Remove the Title and/or Buttons from the dialog, the problem is more evident.
  • Add a quantity of text that shows the scrollviewer
  • If the last line has letters like g, j - the end may be cut off when scrolling with the mouse.

Investigating, we realized that Microsoft's own Content dialog ends up making the wrong calculation when enabling the vertical scrollviewer.
This problem occurs specifically in UWP, Windows 10.
Through investigation, it was discovered that when using fixed values

image

The component behaves properly, but this approach is problematic because it does not know the fixed size of the content.
The correct way is to use it the way Microsoft itself uses it:

image

Steps to reproduce the bug

Bug:

  • Must have DPI 125%, 150% and 175% and Windows 10
  • Must enable the vertical scrollviewer of the Dialog content.
  • Remove the Title and/or Buttons from the dialog, the problem is more evident.
  • Add a quantity of text that shows the scrollviewer
  • If the last line has letters like g, j - the end may be cut off when scrolling with the mouse.

image

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 2 - Microsoft.UI.Xaml 2.8.2

Windows version

Windows 10 (21H2): Build 19044

Additional context

No response

@edsonmata edsonmata added the bug Something isn't working label Sep 20, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Sep 20, 2024
@whiskhub
Copy link
Contributor

offtopic, but congrats for creating the 10'000th issue on the WinUI GitHub repo 😅

@marcelwgn
Copy link
Collaborator

I am unable to reproduce this issue (though I am on Windows 11). Can you tell me where you found that OneUIContentDialogStyle? My app crashes since it's unable to locate that style.

@marcelwgn marcelwgn added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Nov 21, 2024
@FernandoVeras
Copy link

I am unable to reproduce this issue (though I am on Windows 11). Can you tell me where you found that OneUIContentDialogStyle? My app crashes since it's unable to locate that style.

This a personal style, you can use another style to simulate this bug.

I'm creating another bug similar at this one, the same problem with border being cuted in 125% dpi

#10216

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-author-feedback Asked author to supply more information. no-recent-activity product-winui2
Projects
None yet
Development

No branches or pull requests

4 participants