-
Notifications
You must be signed in to change notification settings - Fork 693
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
The flickering issue occurs due to a mismatch in the ActualOffset of the control in UWP when arranging the element. #9317
Comments
Hi Team, - Any update on this?. |
The behavior you describe sounds like layout rounding. If you set Layout rounding is frequently important to ensure rendering is sharp, so turning it off is generally not recommended. |
@codendone - We have checked the suggested approach of setting Can you confirm why these value differences do not occur in a 100% system resolution, but occur in 125% and 150% system resolutions? Please provide the correct solution to address this issue. |
@SathiyathanamSathish You need to set |
@codendone - Thank you for the update. The solution is working in the attached sample, but our application is still experiencing issues with values even after setting the |
Describe the bug
We have organized our control based on the calculation of the desired size of the element. When we scroll in our control using the mouse, we subtract the scrolled pixels from the rectangle and rearrange the elements based on the updated rectangle. This allows us to hide the control. However, when we decrease the rectangle by 5 (scrolledPixels), we encounter some inconsistent results with the ActualOffset. If we further decrease the rectangle by another value (scrolledPixels), we obtain the correct ActualOffset. Because of this discrepancy in ActualOffset, we are experiencing flickering issues on our end.
Note: We have received the correct ActualOffset when the system resolution is set to 100, but the above problem occurs when the resolution is set to 125, 150, or 175.
Can you suggest a solution to obtain the exact ActualOffset when arranging the elements in all system resolutions?
Steps to reproduce the bug
Run the sample in 150 system resolution.
And add the breakpoint in ArrangeOverride method of ScrollableContentViewer.
In that method we have reduce 5 pixels from the final rectangle. Then we called the Element.Arrange(finalRect).
Observed Behavior
We received the Actual Offset as -4.66667
Expected Behavior:
The ActualOffset is should be -5
Sample:
FlickeringDemo.zip
Expected behavior
Should return the correct ActualOffset for all system resolution
Screenshots
In 150 System Resolution
In 100 System Resolution
NuGet package version
None
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: