質問

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