Here’s a simple solution to get the contents of your ListBox ItemTemplate to stretch over the full width of the ListBox. Add this to the declaration of your ListBox:
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
</Style>
</ListBox.ItemContainerStyle>
Hill IT Solutions
Tweet Tweet
- RT @DavidBurela: G/f using Windows 8. "How do I restart the computer?". Hopefully the usability enhancements coming will help with these ... 1 month ago
- RT @shanselman: CSS is like this, don't let anyone tell you otherwise. i.imgur.com/kA1WlQb.gif 1 month ago
- RT @imperugo: it seems today there is no way to deploy on @windowsazure 1 month ago
- Just found out you can create a #NuGet source from a local directory. 1 month ago
- From @gigaom: "“Strategy is not about how you do things. Strategy is about why you do things..." gigaom.com/2013/03/21/get… 2 months ago
-
Recent Posts
Categories
Tags


