Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiline Label with truncating

In my app in Xamarin.Forms I have a label that I want to be multiline but only to a certain point. After that it must be truncated. How can I achieve this?

Currently I can set the LineBreakMode to WordWrap; this creates a multiline label, but there is no truncating.

If it changed the LineBreakMode to TailTruncation, it always truncates after one line.

like image 232
David Pilkington Avatar asked Oct 29 '15 12:10

David Pilkington


1 Answers

You can write a value converter that get the text and return truncated text in the certain point. In the converter, you should remove string from the certain point and yourself put three ... at the end of text.

like image 64
zohre moradi Avatar answered Oct 22 '22 01:10

zohre moradi