#845 – Display Ellipsis in TextBlock to Indicate that Content Doesn’t Fit

By default, when the text in a TextBlock does not fit the available space, the text is simply clipped against the boundaries of the available space.


You can, however, use the TextTrimming property to cause an ellipsis (three dots) to be displayed when the TextBlock contains more text than can be displayed.

Possible values for TextTrimming area:

  • None – no ellipsis, text is clipped  (the default)
  • CharacterEllipsis – display as many characters as possible, followed by an ellipsis
  • WordEllipsis – display as many words as possible, followed by an ellipsis
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>

        <TextBlock Text="{StaticResource someText}"
                    TextWrapping="Wrap" TextTrimming="CharacterEllipsis"
        <StackPanel Grid.Row="1" Background="AliceBlue"/>