Open
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