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
539f4c12-2626-4a1f-a748-2916df285047|0|.0
Tags: