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

Label layout

$
0
0

It looks like Labels in Forms have some auto sizing capabilities out of the box. For example if I create a simple label within a RelativeLayout with a lot of text, only use X/Y coords and omit height/width, it will fill the screen automatically. If the text hits the edge of the screen, it will wrap down to the next line. It will also size itself to be tall enough to accommodate multiple lines of text.

However, if I give a label some X positioning (still no explicit height/width), the label will still be as wide as the screen, and part of it is pushed offscreen by the amount of X positioning I use.

My question is, how can I use multiline labels with more than zero X positioning, without pushing part of the text offscreen, and without resorting to explicit height/width?


Viewing all articles
Browse latest Browse all 58056

Trending Articles