Border cannot render to the requested size and instead renders a 1-2 px margin around itself each time (Windows/iOS/Android all affected) #17882
Labels
area-controls-border
Border
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
layout-stack
platform/android 🤖
platform/iOS 🍎
platform/windows 🪟
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
When a Border is given a height/width request to a given amount (like the screen height/width or the parent's height/width), we do not see this in reality.
In reality, an approximately one pixel padding is added around the Border on all platforms.
This is seen with the following project code, which can be copied and pasted into any new blank project to replace App.xaml.cs:
In this case, the Border and AbsoluteLayout/VerticalStackLayout are set to be the exact same size and match the size of the ContentPage holding them. One should only see a
YellowGreen
screen with nothing else.However, this does not happen on any platform.
Instead we get a red one pixel border around the project as the Border seems to force a 1 pixel margin around itself.
Windows:
Android:
iOS is the same.
This makes it hard to nest objects properly as the Layout elements unpredictably poke through around the edges of any sub elements inside them.
Any fix would be appreciated.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/jonmdev/Height-Width-Bug
Version with bug
7.0.92
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows
Affected platform versions
No response
Did you find any workaround?
No workaround. Project debugs out:
Indicating that the project believes everything is set correctly. But it is not rendering correctly.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: