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

UIElement.RasterizationScale does not change when Display Scale changes; XamlRoot.RasterizationScale does. #9610

Open
karmeye opened this issue May 3, 2024 · 2 comments
Labels
bug Something isn't working documentation An issue with existing documentation or a request for documenation of a new topic team-Rendering Issue for the Rendering team

Comments

@karmeye
Copy link

karmeye commented May 3, 2024

Describe the bug

XamlRoot.RasterizationScale and UIElement.RasterizationScale have the same documentation:

Gets a value that represents the number of raw (physical) pixels for each view pixel.

Steps to reproduce the bug

  1. Modify the display scale
  2. UIElement.RasterizationScale doesn't change

Screenshot 2

Expected behavior

I assume, since documentation of the two properties is exactly the same, that they would behave the same.

Screenshots

Screenshot 1

NuGet package version

WinUI 3 - Windows App SDK 1.5.3: 1.5.240428000

Windows version

Windows 11 (22H2): Build 22621

Additional context

I noticed this while I was implementing a custom tile bar with a text box according to this article. I forgot two use titleBar.XamlRoot.RasterizationScale and instead used titleBar.RasterizationScale.

@karmeye karmeye added the bug Something isn't working label May 3, 2024
Copy link

github-actions bot commented May 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label May 3, 2024
@codendone codendone added documentation An issue with existing documentation or a request for documenation of a new topic team-Rendering Issue for the Rendering team and removed needs-triage Issue needs to be triaged by the area owners labels May 3, 2024
@codendone
Copy link
Contributor

The documentation for UIElement.RasterizationScale is incorrect. Here's the description from when this property was added:

This API lets Xaml create its shape masks, decode images, and play media at a higher resolution than normal. It's meant to be multiplied into the transforms that we've already accumulated in the render walk.

I agree it is confusing that this property has the same name as XamlRoot.RasterizationScale but has this different behavior. We should verify if a documentation change is sufficient or if a design change may be desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation An issue with existing documentation or a request for documenation of a new topic team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

2 participants