Skip to main content
Home Forums Silverlight Design Designing with Silverlight Lining up items in 2 seperate list boxes
1 replies. Latest Post by elmore.adam on July 3, 2009.
(0)
dnlstffrd
Member
0 points
1 Posts
07-03-2009 3:08 PM |
I have items in one listbox that are a grouping of items in a seperate listbox, they are right next to each other, and I'd like to make it so that the items in the left listbox match up with the first item of the group in the right list box. Say for example I have 2 items in the left listbox, and 3 items for each item in the left listbox (so a total of 6), I'd like to space out the items in the left listbox so they line up with the first item of each group in the right listbox. Is there any way to do this? Another issue I'm having is that the items in the right listbox are not necessarily the same size. Thanks in advance for the help.
elmore.adam
482 points
67 Posts
07-03-2009 4:08 PM |
To me, this doesn't seem like good UX design. I think you would be better off using a single ListBox and using the ItemTemplate to generate group headers for each key in an IGrouping collection. This would be visually similar to using ListBox.GroupStyle in WPF. This may not satisfy your user interface requirements, but I think it could be cleaner. The solution you're looking for could be accomplished (anything can, really) I just don't know if it would be worth spending the time on if there are potentially cleaner solutions. Let me know if you need any help creating a DataTemplate as I've proposed.