MAUI Grid inside Scrollview don't respect Margin and don't Center properly
MAUI app is not respecting the Margins when using WidthRequest that is larger than screen (iOS and Android).
When rotating the app also doesn't Center properly on Android (iOS works).
The layout is simplified here, but on Xamarin Forms it works even with more complex layouts with StackLayout and VisualStates that change the layout when rotating the device.
I'm focusing on Android for this issue to keep it simple, but I also checked on iOS. On iOS the margins are also not respected but centering works after rotating the device.
If this is the way MAUI is supposed to work and it's not a bug can you tell me of a way to achieve the layout that I had in Xamarin Forms?
I couldn't find any workaround that allow me to do the layout I want. (I need to app to work on both small and large screen and both portrait/landscape)
I could use code-behind to check the current Width of screen and adjust based on that but that is not ideal at all and I'm finding several issues when updating XAML layouts from Codebehind on runtime also.
Description
MAUI Grid inside Scrollview don't respect Margin and don't Center properly
MAUI app is not respecting the Margins when using WidthRequest that is larger than screen (iOS and Android). When rotating the app also doesn't Center properly on Android (iOS works).
The layout is simplified here, but on Xamarin Forms it works even with more complex layouts with StackLayout and VisualStates that change the layout when rotating the device.
I'm focusing on Android for this issue to keep it simple, but I also checked on iOS. On iOS the margins are also not respected but centering works after rotating the device.
If this is the way MAUI is supposed to work and it's not a bug can you tell me of a way to achieve the layout that I had in Xamarin Forms?
This is blocking our App migration.
Sample Layout used:
Screenshots / Video
Steps to Reproduce
Link to public reproduction project repository
https://github.com/dinisvieira/maui-centered-grid-width-bounds/tree/main
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
Android 13/14, iOS 15/17 (and possibly others)
Did you find any workaround?
I couldn't find any workaround that allow me to do the layout I want. (I need to app to work on both small and large screen and both portrait/landscape) I could use code-behind to check the current Width of screen and adjust based on that but that is not ideal at all and I'm finding several issues when updating XAML layouts from Codebehind on runtime also.
Relevant log output
No response