Suppose I have a long text in a listbox item which can not fit in the screen. I want such text to be automatically rolling so that the user can see the text completely. How can I achieve this? Please help.
Asked
Active
Viewed 739 times
1 Answers
1
Inside your listbox's item data template you could use a TextBlock to display your text and set the TextWrapping property on it to Wrap:
<TextBlock Text="{Binding MyItemText}" TextWrapping="Wrap" Width="150" />
Here's an article on wrapping text and also using line breaks: http://blogs.silverlight.net/blogs/msnow/archive/2008/10/09/silverlight-tip-of-the-day-58-text-wrapping-and-line-breaks-in-textblocks.aspx

KodeKreachor
- 8,852
- 10
- 47
- 64