0

TextBlock wrapping of text in Silverlight XAML file.

I have a wierd and annoying problem. I have a textblock that is inside a stackpanel that is Oriented horizontal. It would be nice if I could have the textblock appear in multiple lines nicely wrapped. How could I do that?

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by amyuni
0

You can use the TextWrapping attribute to configure the way a TextBlock handles text wrapping. The default value is NoWrap, you need to change that to Wrap:

<TextBlock
Text="This text will wrap automatically."
Width="100"
TextWrapping="Wrap"
/>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.