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

Make the text of a label fill up the container (auto font size)

$
0
0

How do I make a label always fill up the container by setting the biggest font size that allows all its text to fit the container?

There's Viewbox control in UWP. But there is no equivalence in Xamarin.Forms.

One way I can think of is to start with the biggest font size and iteratively reduce the size until no overflow occurs. This brings to another question. Is there a way to detect text overflow in a label?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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