[Bug] Grid Spacing is not Pixel-Perfect
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
The `Spacing` in the `Grid` is not pixel-perfect, it changes according the size of the `View`.
This is a problem, especially with small spacings, which disappear completely on different screens/resolutions. In my opinion, the spacings should not be rounded, their size should always be respected in priority, they have a defined absolute value.
Reproduction project available here: https://github.com/MADSENSE/MADSENSE.MAUI.Sample.App/tree/grid-spacing-pixelPerfect
Already tracked by https://github.com/xamarin/Xamarin.Forms/issues/9331
### Expected Behavior
Spacing `1px` line always visible regardless of the Window size:

### Actual Behavior
Spacing `1px` line not visible or double line, depending on Window size.

### Steps to Reproduce
````xml
````
### Version with bug
Release Candidate 1
### Last version that worked well
Unknown/Other
### Affected platforms
iOS, Android, Windows, macOS
### Affected platform versions
Windows 10.0.19041
### Did you find any workaround?
_No response_
### Relevant log output
_No response_
Contributor guide
Research direction
Start with the linked MADSENSE.MAUI.Sample.App reproduction and run the XML Grid example using 1px padding and row/column spacing. Compare the rendered grid across different window sizes and the listed platforms; done means the 1px spacing remains visible without disappearing or becoming a double line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100