Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin/monotouch UILabel multiline

I am trying to add a multiline UILabel form code. After reading some questions it seems the answer is to add this:

textLabel.lineBreakMode = NSLineBreakByWordWrapping;
textLabel.numberOfLines = 0;

The problem is I don't see it available in mono touch.

Does anyone know how to do it in mono touch?

Thanks!

like image 238
Udi Idan Avatar asked Mar 28 '13 16:03

Udi Idan


1 Answers

What you're looking for is probably the LineBreakMode property of UILabel, which takes a UILineBreakMode enum value. So something like this:

textLabel.LineBreakMode = UILineBreakMode.WordWrap;
textLabel.Lines = 0;
like image 57
NilsH Avatar answered Sep 30 '22 13:09

NilsH