Bug 57706 - Formatted Label on UWP doesn't show backgroundcolor
Summary: Formatted Label on UWP doesn't show backgroundcolor
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-06-22 20:58 UTC by Gordon Brown
Modified: 2017-06-22 22:31 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

screenshot of ColorsSample with added formattedtext label (9.69 KB, image/png)
2017-06-22 20:58 UTC, Gordon Brown

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Gordon Brown 2017-06-22 20:58:24 UTC
Created attachment 23063 [details]
screenshot of ColorsSample with added formattedtext label

creating a span with formatted text with BackgroundColor set to any color works fine on Android but doesn't change the text on UWP.  ForegroundColor works.

            var labelFormatted = new Label();
            var fs = new FormattedString();
            fs.Spans.Add(new Span { Text = "Plain text" });
            fs.Spans.Add(new Span { Text = " highlighted text", BackgroundColor = Color.Yellow});
            fs.Spans.Add(new Span { Text = " more plain text"});
            labelFormatted.FormattedText = fs;

Building on VS 2017 Community and deploying to a pc running Windows 10 v1703 OS Build 15063.332.
Comment 1 Paul DiPietro [MSFT] 2017-06-22 22:31:11 UTC
Unfortunately this has been reported before and there's nothing we can do here right now because UWP's Run class (https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Documents.Run) which is used for the Span doesn't have a BackgroundColor property.