title: How to set TextWrapping to Wrap in code behind
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3961278/word-wrap-a-a-string-in-multiple-lines">Word wrap a a string in multiple lines</a>  </p>
  </blockquote>
  
  
  
  <p>I know that in XAML textwrapping may be set on objects by setting <code>TextWrapping="Wrap"</code> but is there a way to do this in code behind? I am populating some listboxes and other objects with text in my code behind depending on the state of other items, but I am not able to set the textwrapping from code behind. Is this possible, and if so how could this be performed?</p>