-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels in VerticalStackLayout in a CollectionView without a WidthRequest is not wrapping according to the LineBreakMode #8873
Comments
This error still exists in the released product VS 2022 v17.3.0 or is it by design? |
As a workaround, in code you can get the width of the display, and set MaxWidthRequest there. |
Exactly same situation I faced. When I use regular Label word wrap is working but when I put it into a StackLayout, wordwrap doesn't work. <ScrollView>
<StackLayout Padding="25" Spacing="15">
<Label LineBreakMode="WordWrap" Text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."/>
<HorizontalStackLayout>
<ImageButton Source="{FontImageSource FontFamily=MaterialRound, Glyph={x:Static m:MaterialRound.Wallpaper}, Color={StaticResource Primary}}" />
<Label LineBreakMode="WordWrap" Text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."/>
</HorizontalStackLayout>
</StackLayout>
</ScrollView> If I set <HorizontalStackLayout>
<ImageButton Source="{FontImageSource FontFamily=MaterialRound, Glyph={x:Static m:MaterialRound.Wallpaper}, Color={StaticResource Primary}}" />
<Label MaximumWidthRequest="300" LineBreakMode="WordWrap" Text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."/>
</HorizontalStackLayout> |
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. |
Verified this issue with Visual Studio 17.7.0 + Net Maui 8.0.0-preview.6.8686. |
Label or Editor not wrapping when put inside the Grid in Collectionview |
Description
I have a HorizontalStackLayout with an image and a VerticalStackLayout containing a Label to hold my Subject. If I use a smaller device I would the Subject to be wrapped accoording to the width of the device and the Labels LineBreakMode. But this is not happend.
If I manually set the width of the VerticalStackLayout the Subject is wrapped but I want this to be automaticly done.
What have I missed or done wrong?
Using VS 2022 v17.3.0 Preview 4.0
dotnet --version: 6.0.400-preview.22330.6
Steps to Reproduce
If I set the WidthRequest to i.e "275" it works but devices can have different widths.
Workaround is to set a WidthRequest and the wrapping works but it is not how it should work.
I also described this in a code of my own;
https://stackoverflow.com/questions/73036703/net-maui-labels-in-verticalstacklayout-in-a-collectionview-not-wrapping-accordi
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
VS 2022 v17.3.0 Preview 4.0,
Did you find any workaround?
If I set the WidthRequest to i.e "275" it works but devices can have different widths.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: