-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
After upgrading from .NET 9 → .NET 10 (MAUI 10), layout rendering becomes broken on first navigation when using:
await Shell.Current.GoToAsync("//signin");
The page is shifted/collapsed/incorrectly arranged until the soft keyboard appears and disappears.
As soon as I tap an Entry → keyboard opens → hide keyboard → layout becomes correct.
This means the initial layout pass is wrong, and only a soft-input size change triggers correct measure/arrange.
This did NOT happen in .NET 9 on the same codebase.
Affected platforms
Android (primary issue)
iOS (same behavior)
Appears only in MAUI 10.
Reproduction Steps
- Create a ContentPage with any layout (Grid / VerticalStackLayout).
- Navigate to it using: await Shell.Current.GoToAsync("//signin");
- Observe that the page loads with broken / shifted layout.
- Tap Entry → keyboard shows → hide keyboard.
- Layout suddenly becomes correct.
Expected Behavior
Page should render correctly on first appearance, without requiring a keyboard event to correct the layout.
Actual Behavior
First layout is incorrect.
Only after soft keyboard open/close does MAUI recalc layout properly.
InvalidateMeasure, ForceLayout, IView.InvalidateMeasure, Loaded event, delayed dispatch, etc. do NOT fix the issue.
This strongly suggests a regression in the new Layout system and/or Shell navigation lifecycle.
Notes
Issue appears when navigating with Shell absolute route (//route).
Same code works perfectly in .NET 9.
Attempts to fix using: IgnoreSafeArea , UseSafeArea, SafeAreaEdges, Dispatcher.DispatchDelayed, InvalidateMeasure → no effect.
Keyboard resize event is the only thing that fixes the page.
Sample XAML (minimal reproduction)
`
<VerticalStackLayout Spacing="16" Padding="20">
<Image
Source="dotnet_bot.png"
HeightRequest="150"
Aspect="AspectFit" />
<Entry Placeholder="Email" />
<Entry Placeholder="Password" />
<Button Text="Sign in" />
</VerticalStackLayout>
Metadata
Metadata
Assignees
Labels
Type
Projects
Status