문제

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