Xamarin.Forms
Xamarin.Forms copied to clipboard
[Bug][iOS] TextDecorations property does not work on Span on iOS
Description
I need to underline some pieces of text. For this I use Spans with the TextDecorations property giving it the value Underline. It worked fine on version 5.0.0.2125. Now I'm working on version 5.0.0.2401 and it doesn't work anymore.
Steps to Reproduce
- Create a project with Xamarin Forms 5.0.0.2125
- Create a Label with a FormattedText containing Spans with the TextDecorations Underline value
- Launch your app -> The text is underlined
- Upgrade to Xamarin Forms 5.0.0.2401
- Launch the app again -> The text is not underlined
Expected Behavior
The text is underlined.
Actual Behavior
The text is not underlined.
Basic Information
- Version with issue: 5.0.0.2401
- Last known good version: 5.0.0.2125 (I have not tried with all intermediate versions)
- Platform Target Frameworks:
- iOS: 15.3.1 / 15.4
- Android: works well on Android
Had just come here to post this and it was reported just 13 hours ago 😂
I also need it.
Also seeing this issue on XF 5.0.0.2337
Still doesn't work on iOS XF 5.0.0.2401 @jfversluis this is quite important for people who have apps in production.
we are also affected by this. Is there a work-a-round available?
Unfortunately there doesn't seem to be a work around. @jfversluis, could you take a look at it please? It seems that many of us are bothered by this problem. If not, could you at least inform us if this bug is not planned to be studied because it is considered minor by the team.
Hi @SamuelLioult: We have the same problem (underline does not work for Span inside FormattedString on iOS). Following tip works for us: https://stackoverflow.com/questions/72121135/span-label-underline-is-not-working-on-xamarin-ios
We simply call a DataTrigger-variable 100ms after the page was initialized. Hope this helps
This is an old post but it works for me: https://theconfuzedsourcecode.wordpress.com/2016/03/10/so-i-created-this-awesomehyperlinklabel-custom-renderer-control-one-day-for-xamarin-forms/ It actually cover phone number and email as well apart from hyperlink. So it is more useful IMO.
I'm also seeing this problem in XF 5.0.0.2291.
@martinhellwig Thank you for this workaround. This issue is still present in XF 5.0.0.2515. Anyone know if it is also present in early versions of MAUI?
This issue is still present in Xamarin.Forms Version="5.0.0.2612" Any news ?