views:

28

answers:

1

I have a list of textual descriptions, each of which a user must score on a scale of 1-5. The number of textual descriptions is variable, so I can't just define a static Grid in XAML.

The following image shows approximately what I'm after:

alt text

In ASP.NET, I could bind my list of text items to a Repeater control. For each row, the text would be displayed in a Label, and next to it would be a DropDownList that contains a static list of items. Is there a similar control available in Silverlight?

Should I be using one of these?

  • DataGrid
  • ListBox
  • Custom control derived from ItemsControl
  • (Other)
A: 

I solved this by using an ItemsControl, and within the ItemTemplate I placed the TextBlock and ComboBox controls.

The only wrinkle for me was that the ComboBox depended on a separate DataContext, so I had to resort to using the DataContextProxy described in this article

Jon Sagara