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

Inset text via LabelRenderer

$
0
0

Hello all,

I'm trying to create a control in Xamarin.Forms that looks similar to Messages on iOS. I'm trying a few different approaches and the current approach requires me to inset the text in a UILabel. Problem is: Xamarin.Forms.Platform.iOS.LabelRenderer doesn't seem to let me override DrawText where I could do something like:

override DrawText (RectangleF rect)
{

var insets = new UIEdgeInsets (5, 15, 5, 5);
base.DrawText (insets.InsetRect (rect));

}

Any one have any advice on how I could inset the text on a UILabel via LabelRenderer? Or is there some way I can use a UITextView inside of a ContentPage via Xamarin.Forms custom renderers, since that control already has an inset?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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