Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Text will not underline

$
0
0

I am trying to underline text in custom renderer. My renderer extends LabelRenderer and overrides the OnElementChanged method. Below is my code for iOS:

base.OnElementChanged(e);

this.Control.AttributedText = new NSAttributedString(this.Control.Text, underlineStyle: NSUnderlineStyle.Single);

However, this does not cause the text to be underlined. On Android, I can successfully underline the text but not on iOS. Any ideas what could be going on? I adapted code many others have claim works, including code from the ExtendedLabel in the Xamarin Labs project with no luck.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>