自动剪辑并在WPF标签中附加点 [英] Auto clip and append dots in WPF label
本文介绍了自动剪辑并在WPF标签中附加点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果当前文本不适合WPF中的宽度,如何自动剪切文本并在标签上附加点?
How can I auto clip text and append dots on a label if the current text doesn't fits to its width in WPF?
推荐答案
Put a TextBlock inside your label and set TextTrimming to CharacterEllipsis or WordEllipsis
<Label>
<TextBlock TextTrimming="CharacterEllipsis">Hello World</TextBlock>
</Label>
这篇关于自动剪辑并在WPF标签中附加点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文