views:

92

answers:

1

How can I auto clip text and append dots on a label if the current text doesn't fits to its width in WPF?

e.g.

auto clip and append dots in label

+5  A: 

Put a TextBlock inside your label and set TextTrimming to CharacterEllipsis or WordEllipsis

<Label>
     <TextBlock TextTrimming=CharacterEllipsis>Hello World</TextBlock>
</Label>
Ray