Is there a silverlight repeater control (like in ASP.NET)?

I need to show a list of many text strings, each on a line.

I need items to be selectable, so i cant use an ItemsControl.

I only need one "column" and no sorting, so a DataGrid might be too heavyweight (???) I need up to 1000 items, so a Listbox might be too lightweight (???)

What Silverlight control (or Toolkit control) would be best for this use?

13.10.2009 23:44:25
3 ОТВЕТА

The functional equivalent of is indeed . If you need an ItemsControl that has Selection, use one of the classes the inherit from Selector (which coincidently itself inherits from ItemsControl):
1. ComboBox
2. ListBox
3. TreeView (Selector API)
4. AutoCompleteBox (Selector API)

All of these support the same ItemsControl API of ItemsControl.ItemTemplate=DataTemplate.

7
14.10.2009 00:02:34
Is there a way to disable the selection mode for a ListBox?
Mike Cole 11.07.2011 20:28:59

DataGrid has good performance because of virtualization:

The DataGrid boasts excellent performance with large sets of data because it uses virtualization, unlike any other Silverlight control. That means the DataGrid only retains in-memory objects for the data that’s currently visible, not the entire set of data that’s loaded. This reduces the memory overhead dramatically and allows it to practically hold thousands (or even millions) of rows. The only tradeoff is that the DataGrid is slightly slower when scrolling, because it needs to clear the current set of DataGridRow objects and load the information that corresponds to the new rows.

3
14.10.2009 21:46:46

I would add the HeaderedItemsControl from the Silverlight Toolkit. Here's an article: HEADEREDCONTENTCONTROL & HEADEREDITEMSCONTROL

0
20.09.2011 06:28:33