-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[regression/8.0.3] Setting a style on a label causes spans with FontAttributes to be ignored on Android #19190
Copy link
Copy link
Closed
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorshas-workaroundi/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/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
Consider this .NET MAUI 8 XAML:
<?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="TestAndroidSpans.MainPage">
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="TextColor" Value="Black"/>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<Label HorizontalOptions="CenterAndExpand" TextColor="Gray" >
<Label.FormattedText>
<FormattedString>
<Span Text="{Binding NotBold}"/>
<Span Text="{Binding Bold}" FontAttributes="Bold" />
</FormattedString>
</Label.FormattedText>
</Label>
</ContentPage>Notice that the Bold span is ignored.
If the Style is removed, everything works as expected:

Steps to Reproduce
Create a new .NET 8 MAUI app and add the above XAML in the MainPage.xaml. Run the app. Notice the missing bold text
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android
Did you find any workaround?
No response
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorshas-workaroundi/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/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
