Reputation: 95
I am creating a text block object in c#, so I don't have any XAML for it. How can I enable textwrapping on this object?
Upvotes: 0
Views: 86
Reputation: 30865
var textBlock = new TextBlock(/*params*/)
textBlock.TextWrap = TextWrapping.Wrap;
or
var textBlock = new TextBlock(/*params*/) { TextWrap = TextWrapping.Wrap};
Upvotes: 3