«

»

Print this Post

Using full container width for ListBoxItem

A couple of days ago I was building a ListBox for a wp7 app which required the ListBoxItems to use the full width of the container. I tried to apply some of my WPF knowledge to fix the problem, using HorizontalAlignment=”Stretch” but to no avail. It took me ages to find a work around & I ended up using fixed width’s. For now, a fixed width solution is okay in portrait mode, but if I wanted the app to support both orientations, I would need a better solution.

This morning I stumbled across this post which explains that there is a bug in the coding for the WP7 Silverlight ListBox and the correct XAML code to fix it. Click the link below to read the full article.

Full Article: Timdam’s blog

Permanent link to this article: http://www.saintchubs.com/using-full-container-width-for-listboxitem.html

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Switch to our mobile site