Windows Labels inside frames not wrapping
Description
In Windows, a Label inside a Frame will not wrap text but will resize the container as if it wrapped. The only LineBreakMode that's not truncation-related is NoWrap. iOS and Android are fine.
Something worth noting is that if the frame is already small enough such that the text is forced to wrap before the app launches (i.e setting a fixed WidthRequest), the initial wrapping is fine.
Tried using the Sandbox project from main and I still hit the bug.
Steps to Reproduce
- Create a Maui app
- Copy and paste the following code:
<VerticalStackLayout VerticalOptions="Center" BackgroundColor="AliceBlue">
<Frame Margin="10"
CornerRadius="8"
BackgroundColor="Grey" BorderColor="Red">
<Label Margin="10" Text="Label with no LineBreakMode. Label with no LineBreakMode" />
</Frame>
<Label Margin="40,10" Text="Label with no LineBreakMode. Label with no LineBreakMode" />
<Frame Margin="10"
CornerRadius="8"
BackgroundColor="Grey" BorderColor="Red">
<Label LineBreakMode="WordWrap" Margin="10" Text="Label with LineBreakMode ='WordWrap'. Label with LineBreakMode ='WordWrap'" />
</Frame>
<Label LineBreakMode="WordWrap" Margin="40,10" Text="Label with LineBreakMode ='WordWrap'. Label with LineBreakMode ='WordWrap'" />
<Frame Margin="10"
CornerRadius="8"
BackgroundColor="Grey" BorderColor="Red">
<Label LineBreakMode="NoWrap" Margin="10" Text="Label with LineBreakMode ='NoWrap'. Label with LineBreakMode ='NoWrap'" />
</Frame>
<Label LineBreakMode="NoWrap" Margin="40,10" Text="Label with LineBreakMode ='NoWrap'. Label with LineBreakMode ='NoWrap'" />
</VerticalStackLayout>
- Build and debug using Windows.
- Resize the window to the point where text should wrap

Link to public reproduction project repository
(See code in repro steps)
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 11
Did you find any workaround?
No response
Relevant log output
No response
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Something worth noting: if the frame is already small enough such that the text has to wrap the when the application rendered, it displays correctly and breaks once again once text has to wrap again:
.
This issue also seems to affect macOS, but the container does not resize