Page 1 of 1

Text Box Trimming

Posted: 16 May 2025, 18:03
by MightyBear
Hey Noesis forum!

little quick one for you (hopefully), When using a text box, is there a way to apply vertical trim as seen in figma, so that the bounding box hugs the top and bottom of the text?

I see that there is "Text Trimming" that can be set to CharacterEllipsis, but it seems to have no effect when turned on.

Any help Much appreciated!

Re: Text Box Trimming

Posted: 16 May 2025, 18:28
by dstewart
Hi Ken! Dorian here!

The TextBlock Element comes with a Padding Property, which when set to negative values, can help you achieve the result you're looking for.
What's cool too is that these are not just a visual change in the adorner, but will also impact the physical footprint of the TextBlock within a layout.

TextHeight.jpg

The Text Trimming Property on the other hand has more to do with how a TextBlock reacts when there is not enough room for the entirety of the content to fit within an allocated space. So for example, in the below, the lower TextBlock is given less dimensional space than the upper TextBlock; and because its set to have Text Trimming, it displays as much text as possible in the space available, minus the room required to add in the ellipsis.

TextTrimming.jpg

Let us know if this helps!

Re: Text Box Trimming

Posted: 19 May 2025, 16:59
by MightyBear
That was perfect! Thank you!!

Re: Text Box Trimming

Posted: 19 May 2025, 17:31
by dstewart
Fantastic; thrilled to hear! Thanks for reporting back!