Silverlight: Getting your Listbox Items to stretch

I was having some trouble getting my ListBox items to stretch across the entire ListBox. I did not want to get into the game of dropping into code to fix layout issues. Here is what I had to do.

This first attempt did not work:


I had assumed that the HorizontalContentAlignment attribute would do the trick. For most controls it does. I was wrong. Here is what I finally had to do:



Notice the addition of the container style. As far as I can tell this is a bug. I found the original answer here.

Comments

ahmed said…
الأسعار والخصومات خيالية ، فقط بمجرد الاتصال بنا نعرض لكم جميع عروضنا
خدماتنا متوفرة اليوم وفي أي وقت من السنة اتصل بنا نجد شركة تنظيف في الدمام

شركة النجوم لخدمات التنظيف
شركة نقل عفش بمكة
شركة نقل اثاث بمكة
شركة عزل خزانات بمكة
Ananad said…
This comment has been removed by the author.
Anonymous said…
Thank you for sharing this valuable information. My friend and I were just starting our research on this topic. Fencing & Deck Pros of Milton

Popular posts from this blog

New Pattern: CPT (Can't Polish a Turd)

Getting the Data out of my Controller Tests

Microsoft MVC or Is the Monorail off it's track?