Open nonubitta opened 4 years ago
Any update on how long will this take?
Text 1 <Span style='color:teal'>Teal Text</Span> Text2
A workaround I found out is to not to set TextColor
property of Label
instead
<span style="color:black">Text 1</span> <Span style='color:teal'>Teal Text</Span><span style="color:black">Text2</span>
For me the workaround doesn't work. I need to get this bug fixed asap please.
Why did get removed? Are we not going to get it fixed? @samhouts ?
In general aspects it is difficult to apply styles to an html label, since it does not accept font family from html, font-size and a large number of other styles to the labels. You have to guess which labels work to apply such a thing. It would discard completely to use label html to apply styles to it.
Hi, the problem is when the AttributedText from the native control (UIKit.UILabel) is set https://github.com/xamarin/Xamarin.Forms/blob/8b5c97824c85f905eaf8c93115aaa6c5dbf1066e/Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs#L469 the TextColor property becomes invalid (Font too). The "working" way shows HtmlLabelPlugin in SetText (https://github.com/matteobortolazzo/HtmlLabelPlugin/blob/8405f1aa717c8fce79c37705123f61a46eb7f687/src/HtmlLabel/iOS/Renderer.cs#L86) XF needs to set ForegroundColor if font is black
I know this is reported on iOS, but I am having the same problem on Xamarin UWP. Has anyone been able to find a work-around for this?
Description
Recently TextType="Html" bug was fixed for ios (#10989 ) It does somewhat work better now. It respects FontFamily and FontSize. But it doesn't work with TextColor.
Steps to Reproduce
Expected Behavior
It should apply html formatting wherever applied and also respect TextColor
Actual Behavior
Basic Information
Screenshots
Reproduction Link
Workaround