0

Is there a way to set a maximum line count for a WPF WrapPanel? The goal would be to max out at 2 lines and add an ellipses if the content would normally wrap to a 3rd line. The trick is that the content is dynamic and not known at compile time.

enter image description here

Bill Tarbell
  • 4,933
  • 2
  • 32
  • 52

1 Answers1

0

Use a TextBlock like this

<TextBlock Text="{StaticResource someText}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Margin="10"/>
Aakanksha
  • 329
  • 2
  • 7