Tuesday, August 7, 2007

3 dots (...) if space is insufficient

In older days if we want to put 3 dots (...), where there is no space to display full text,we have to do a bundle of calculations.

But in WPF its in built.Use

TextTrimming="CharacterEllipsis"

To get 3 dots...

<TextBlock Text="Joy George K" TextTrimming="CharacterEllipsis" />

Note : If you are using stack panel with orientation horizontal this wont work.If anybody have solution,please let me know.

1 comment: