-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-controls-labelLabel, SpanLabel, Spanfixed-in-8.0.20fixed-in-9.0.0-preview.4.10690platform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When using a generic Label
with a Span
, the LineHeight
seems to be exponentially applied or something on Android.
I understand that there are platform differences, but this behavior simply doesn't work and isn't usable. Is there something I'm misunderstanding or missing?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
<Grid x:Name="contentGrid">
<Label LineBreakMode="WordWrap">
<Label.FormattedText>
<FormattedString>
<Span LineHeight="1.15">Outside, the church's garden was a haven of tranquility, where nature and spirituality intertwined harmoniously. Flowers bloomed in vibrant hues, each petal seemingly capturing a prayer or hope of the visitors who walked among them. The garden, lovingly tended by members of the congregation, reflected the church's commitment to nurturing not just the soul, but also the beauty of the world around it. It was a place where people of all walks of life could find solace, inspiration, and a sense of belonging within the embrace of the church's community.</Span>
</FormattedString>
</Label.FormattedText>
</Label>
</Grid>
</ContentPage>
When the LineHeight
is removed:
Xamarin
In Xamarin, this works as intended:
Steps to Reproduce
- Pull the reproduction project
- Run and see
Or
- Paste the following XAML into a new MAUI project:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
<Grid x:Name="contentGrid">
<Label LineBreakMode="WordWrap">
<Label.FormattedText>
<FormattedString>
<Span LineHeight="1.15">Outside, the church's garden was a haven of tranquility, where nature and spirituality intertwined harmoniously. Flowers bloomed in vibrant hues, each petal seemingly capturing a prayer or hope of the visitors who walked among them. The garden, lovingly tended by members of the congregation, reflected the church's commitment to nurturing not just the soul, but also the beauty of the world around it. It was a place where people of all walks of life could find solace, inspiration, and a sense of belonging within the embrace of the church's community.</Span>
</FormattedString>
</Label.FormattedText>
</Label>
</Grid>
</ContentPage>
Link to public reproduction project repository
https://github.com/bradencohen/MauiRepros
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
Nope, but any ideas would be super appreciated.
Relevant log output
No response
Metadata
Metadata
Assignees
Labels
area-controls-labelLabel, SpanLabel, Spanfixed-in-8.0.20fixed-in-9.0.0-preview.4.10690platform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done