TextBlock TextWrapping in ListBoxItem

by Markus 26. January 2010 18:26

TextBlock TextWrapping in ListBoxItem

 

If you have a ListBox and and you want to stretch the ListBox Items to fit exactly the width of the Textbox you have to Edit the Template for the Listbox and set the HorizontalContentAlignment for the ListBox Items to Stretch.

 

Now, if you have a TextBlock in a Listbox Item and the Text is longer than the Width of the Listbox but you don’t want the Listbox Item to extend its width but to wrap the Text you will have to set the HorizontalScrollbar to disabled.

 

< Back to Content

Tags:

About MaHop.Net

Just look on our Webpage http://www.mahop.net

Tag cloud