Somewhat hidden in the variety of properties of the TextBlock control, is a function for text trimming in WPF and Silverlight. Without much cost it is possible to automatically trim long texts in a TextBlock control and show three periods instead. Here’s an example of this behavior:
This behavior can be controlled by the “TextTrimming” Property of the TextBlock control. In WPF there is an extra Value for this property: “CharacterEllipsis”. This has the effect, that the text trimming occurs in the middle of a word, if the space is too small. WATCH OUT: In Order to get the right result, set the “TextWrapping” property of the TextBlock to “NoWrap”.