Alexey F Shevelyov Alexey F Shevelyov - 1 year ago 255
Android Question

XAMARIN (C#) - Is There A Way To Underline A TextView Programmatically?

I know there are some other ways to do it (I think in Java you do something like this

) - and I do understand that it could be sort of emulated using the Draw Line and there is a way to do it predefining it in xml file as well.

The question is how to accomplish it **programmatically in Xamarin (C#)? There should be a property on the object or someway to set it**

Answer Source

Most "Set" methods in Android are converted to C# Properties in Xamarin. So



my_object.PaintFlags = PaintFlags.UnderlineText;