Вопрос

The size of the content of my textblock is too long so I would like to cut the text which not fit inside the textblock and replace its end by "...".
What is the best solution to stretch a text ?
I would prefer to not have to do this with codebehind.Maybe is there a property but I didn't find it.

I already tried to use the FontStretch property in vain...

Thank you.

Это было полезно?

Решение

Use TextTrimming property of textblock. Here is more about TextTrimming

<TextBlock  TextTrimming="WordEllipsis"  Text="your text" />
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top