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

Center-Align Label

$
0
0

Hi,

I am wondering if anyone knows how to center-align a label. Obviously it is possible to set the Horizontal and Vertical layout options to center or centerandexpand. This will center the first line of the label, however, if I have a label that is too wide for the device screen and therefore the final word is pushed on to a second line, the first line of the label will be centered but the second line will be left-aligned. I want all lines of the label to be centered on the screen.

I have managed to create a quick get around by splitting the label in to different labels for each line and centering these which gives me the desired effect on the particular device I am testing on but won't look right on devices with a different size screen.

Thanks.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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