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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With