How can I determine if my TextBlock text is being trimmed?

后端 未结 5 1593
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 01:02

The following textblock wraps and trims as expected. The elipsis \"...\" is displayed when the text is trimmed.



        
5条回答
  •  粉色の甜心
    2020-11-30 01:45

    I haven't done a lot of WPF lately, so I'm not sure if this is what you're looking for, but check out this article: Customizing “lookful” WPF controls – Take 2. It's a bit complex, but it seems to address the same question you're asking. UPDATE: The website seems gone, but you can find the article in the archive. SEE Scott Chamberlain's ANSWER WITH THE SAMPLE CODE (thanks Scott).

提交回复
热议问题