Maximum number of lines for a Wrap TextBlock

前端 未结 7 1554
心在旅途
心在旅途 2021-02-05 02:40

I have a TextBlock with the following setting:

TextWrapping=\"Wrap\"

Can I determine the maximum number of lines?

for exam

7条回答
  •  隐瞒了意图╮
    2021-02-05 03:08

    If you have Height, TextWrapping, and TextTrimming all set, it will behave exactly like you want:

    
    

    The above code will wrap up to two lines, then use CharacterEllipsis beyond that point.

提交回复
热议问题