FormattedText: Span BackgroundColor does not work #4788
Labels
area-controls-label
Label, Span
fixed-in-6.0.300-rc.1
Look for this fix in 6.0.300-rc.1!
good first issue
Good for newcomers
high
It doesn't work at all, crashes or has a big impact.
platform/windows 🪟
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
My application supports color syntax highlighting and I expected to be able to use Span to implement it. Unfortunately, setting BackgroundColor does nothing that I could see. Setting TextColor works as expected. I tried setting it directly on a Span, and setting it using a Setter in a Style. Neither one worked. I also expect a Span's BackgroundColor to override any background color set on the containing Label.
Steps to Reproduce
Note the following: The encompassing Label is Magenta text on a Green background because of the default Style. The Span's default Style should override this to be Navy text on an Orange background, except for the first Span, which explicitly sets it to be Yellow text on a Red background:
The attached zip file contains MainPage.xaml and MainPage.xaml.cs.
SpanProblem.zip
Version with bug
Preview 13 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
Windows SDK 10.0.18362 and later
Did you find any workaround?
No workaround was apparent.
Relevant log output
None
The text was updated successfully, but these errors were encountered: