Home > C#, WPF > How to Text Wrap a Label in WPF?

How to Text Wrap a Label in WPF?

January 26th, 2010 joy Leave a comment Go to comments

WPF does not allow text wrapping for label control.Thus to wrap a label with a fixed width,we have to place the TextBlock control inside the label control and set its TextWrapping property to “Wrap”.

<Label Width=”50″>
<TextBlock TextWrapping=”Wrap”> I am label with width 50</TextBlock>
</Label>

Popularity: 8% [?]

Categories: C#, WPF Tags:
  1. No comments yet.
  1. No trackbacks yet.