anon2
anon2

Reputation: 95

silverlight c# textwrapping

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

Answers (1)

var textBlock = new TextBlock(/*params*/)

textBlock.TextWrap = TextWrapping.Wrap;

or

var textBlock = new TextBlock(/*params*/) { TextWrap = TextWrapping.Wrap};

Upvotes: 3

Related Questions