Wrap text in a WPF Label

In WPF, the Label control does not support text wrapping. If you need a label that wraps contents across multiple lines, you can use a TextBlock control. Place a TextBlock control inside a Label and apply wrapping on TextBlock.

The following example shows how to use a TextBlock to make a label that wraps several lines of text.

<Label Name="Label1" Width="200" HorizontalAlignment="Left">
<TextBlock TextWrapping="WrapWithOverflow">
This is a Label with text wrapping feature. If text does not fit in a single line,
It will move to next line.

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now